react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

🐛 [Android] App crashes when the camera is opened and a Frame Processor is active

Open Sophearithz opened this issue 1 year ago • 7 comments

What's happening?

FATAL EXCEPTION: main Process: com.app.mobile.uat, PID: 6829 com.facebook.react.uimanager.IllegalViewOperationException: Trying to resolve view with tag 1968 which doesn't exist at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveView(NativeViewHierarchyManager.java:99) at com.facebook.react.uimanager.UIManagerModule.resolveView(UIManagerModule.java:834) at com.mrousavy.camera.frameprocessors.VisionCameraProxy.findCameraViewById(VisionCameraProxy.kt:45) at com.mrousavy.camera.frameprocessors.VisionCameraProxy.setFrameProcessor$lambda$0(VisionCameraProxy.kt:55) at com.mrousavy.camera.frameprocessors.VisionCameraProxy.$r8$lambda$LRYrkt1bsxP9-zJirwSfJEU2u4k(Unknown Source:0) at com.mrousavy.camera.frameprocessors.VisionCameraProxy$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:230) at android.os.Looper.loop(Looper.java:319) at android.app.ActivityThread.main(ActivityThread.java:8919) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

Reproduceable Code

<VCamera
    ref={cameraRef}
    style={StyleSheet.absoluteFill}
    device={device}
    photo={true}
    isActive={true}
    frameProcessor={frameProcessor}
              />

Relevant log output

2025-04-04 22:34:16.621  6829-6829  AndroidRuntime          com.app.mobile.uat                E  FATAL EXCEPTION: main
                                                                                                    Process:  com.app.mobile.uat , PID: 6829
                                                                                                    com.facebook.react.uimanager.IllegalViewOperationException: Trying to resolve view with tag 1968 which doesn't exist
                                                                                                    	at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveView(NativeViewHierarchyManager.java:99)
                                                                                                    	at com.facebook.react.uimanager.UIManagerModule.resolveView(UIManagerModule.java:834)
                                                                                                    	at com.mrousavy.camera.frameprocessors.VisionCameraProxy.findCameraViewById(VisionCameraProxy.kt:45)
                                                                                                    	at com.mrousavy.camera.frameprocessors.VisionCameraProxy.setFrameProcessor$lambda$0(VisionCameraProxy.kt:55)
                                                                                                    	at com.mrousavy.camera.frameprocessors.VisionCameraProxy.$r8$lambda$LRYrkt1bsxP9-zJirwSfJEU2u4k(Unknown Source:0)
                                                                                                    	at com.mrousavy.camera.frameprocessors.VisionCameraProxy$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:230)
                                                                                                    	at android.os.Looper.loop(Looper.java:319)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8919)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

Camera Device

{
    "formats": [
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 2448
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1836
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2448,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 2448
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1504
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2560,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1440
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1440
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2336,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 886
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1440,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1088,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1088
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1280,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 720
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 960,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 720
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 720,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 480
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 640,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 480
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 640,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 360
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 352,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 288
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 320,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 240
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 256,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 144
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 176,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1920,
            "supportsVideoHdr": false,
            "videoHeight": 1080,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 144
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 2448
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1836
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2448,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 2448
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1504
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2560,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1440
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1440
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2336,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 886
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1440,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1088,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1088
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1280,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 720
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 960,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 720
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 720,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 480
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 640,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 480
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 640,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 360
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 352,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 288
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 320,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 240
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 256,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 144
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 176,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 1280,
            "supportsVideoHdr": false,
            "videoHeight": 720,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 144
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 2448
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1836
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2448,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 2448
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1504
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2560,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1440
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1440
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2336,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 886
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1440,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1088,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1088
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1280,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 720
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 960,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 720
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 720,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 480
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 640,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 480
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 640,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 360
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 352,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 288
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 320,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 240
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 256,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 144
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 176,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 720,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 144
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 2448
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1836
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2448,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 2448
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 3264,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1504
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2560,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1440
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1440
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 2336,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1920,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 886
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1440,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1080
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1088,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 1088
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 1280,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 720
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 960,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 720
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 720,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 480
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 640,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 480
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 640,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 360
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 352,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 288
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 320,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 240
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 256,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 144
        },
        {
            "videoStabilizationModes": [
                "off"
            ],
            "autoFocusSystem": "contrast-detection",
            "photoWidth": 176,
            "supportsPhotoHdr": true,
            "supportsDepthCapture": false,
            "maxISO": 2500,
            "minISO": 40,
            "minFps": 8,
            "videoWidth": 640,
            "supportsVideoHdr": false,
            "videoHeight": 480,
            "fieldOfView": 82.52868147030092,
            "maxFps": 30,
            "photoHeight": 144
        }
    ],
    "sensorOrientation": "landscape-right",
    "hardwareLevel": "limited",
    "maxZoom": 4,
    "minZoom": 1,
    "maxExposure": 20,
    "supportsLowLightBoost": false,
    "neutralZoom": 1,
    "physicalDevices": [
        "wide-angle-camera"
    ],
    "supportsFocus": true,
    "supportsRawCapture": false,
    "isMultiCam": false,
    "minFocusDistance": 0,
    "minExposure": -20,
    "name": "1 (FRONT) androidx.camera.camera2",
    "hasFlash": false,
    "hasTorch": false,
    "position": "front",
    "id": "1"
}

Device

Samsung galaxy A54 5G

VisionCamera Version

4.6.4

Can you reproduce this issue in the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

Sophearithz avatar Apr 04 '25 15:04 Sophearithz

Guten Tag, Hans here! 🍻

Looks like you encountered a crash related to view tags while using a Frame Processor in your app. Thank you for providing detailed logs and relevant code — very helpful!

However, I noticed that you didn't test your issue in the VisionCamera Example app, which is essential for us to troubleshoot effectively. Please try to reproduce the issue there and provide those details. This will help mrousavy resolve the issue more efficiently.

In the meantime, if you would like to support the continued development and maintenance of this project by mrousavy, consider becoming a sponsor: GitHub Sponsors.

Looking forward to your update!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

maintenance-hans[bot] avatar Apr 04 '25 15:04 maintenance-hans[bot]

@mrousavy please

Sophearithz avatar Apr 07 '25 01:04 Sophearithz

@Sophearithz What we've noticed in our app, that if we didn't take care of memoization of the frameprocessor function, react can try to update (set) the frameprocessor on the vision camera a lot. Even when the camera might be removing itself from the view. So if you use Vision Camera's useFrameProcessor hook, take a good look at the dependency array. And try to prevent unnecessary changes.

Hope this give you a bit of direction.

Furthermore, as Hans here said, try to reproduce the issue with the example app. Having a simple example really helps debugging the issue for the maintainers of the library.

PS. Not a maintainer or contributor of the lib, just a friendly neighbor who uses the lib too.

mardii avatar Apr 10 '25 13:04 mardii

i cannot resolve the issue until now. please help, here is my code

`const frameProcessor = useFrameProcessor(frame => { 'worklet';

const faces = scanFaces(frame);
runOnJS(() => {})();

}, []);

<VCamera ref={cameraRef} style={StyleSheet.absoluteFill} device={device} photo={true} isActive={true} frameProcessor={frameProcessor} /> ` React Native V0.78.2

Sophearithz avatar Apr 18 '25 03:04 Sophearithz

any update for this issue ?

omarhija10 avatar Apr 29 '25 08:04 omarhija10

same problem here in android, RN 0.76 + "react-native-vision-camera": "^4.7.0", newArch enabled

ignaciotcrespo avatar Aug 18 '25 23:08 ignaciotcrespo

Same issue, any updates regarding this issue?

AyoubXwire avatar Sep 04 '25 09:09 AyoubXwire