-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
π bugSomething isn't workingSomething isn't working
Description
What's happening?
Crash occurs while setting or running a frameProcessor during scanning.
It throws ViewNotFoundError indicating that the Camera view ID cannot be found.
Reproduceable Code
const isFocused = useIsFocused();
const device = useCameraDevice('back');
const cameraRef = useRef(null);
const frameProcessor = useFrameProcessor(frame => {
'worklet';
// QR / frame processing logic
}, []);
if (!device) return null;
return (
<Camera
ref={cameraRef}
style={StyleSheet.absoluteFill}
device={device}
isActive={isFocused}
frameProcessor={frameProcessor}
/>
);Relevant log output
Fatal Exception: java.lang.RuntimeException
Caused by java.lang.reflect.InvocationTargetException
Caused by com.mrousavy.camera.core.ViewNotFoundError
The given view (ID 10042) was not found in the view manager.
at com.mrousavy.camera.frameprocessors.VisionCameraProxy.findCameraViewById (VisionCameraProxy.kt:47)
at com.mrousavy.camera.frameprocessors.VisionCameraProxy.setFrameProcessor (VisionCameraProxy.kt:55)
at android.os.Handler.handleCallback (Handler.java:995)Camera Device
{
"formats":[],
"hardwareLevel":"full",
"hasFlash":true,
"hasTorch":true,
"id":"0",
"isMultiCam":true,
"maxExposure":20,
"maxZoom":10,
"minExposure":-20,
"minFocusDistance":10,
"minZoom":0.6000000238418579,
"name":"0 (BACK) androidx.camera.camera2",
"neutralZoom":1,
"physicalDevices":[
"wide-angle-camera",
"ultra-wide-angle-camera",
"wide-angle-camera",
"telephoto-camera"
],
"position":"back",
"sensorOrientation":"landscape-left",
"supportsFocus":true,
"supportsLowLightBoost":false,
"supportsRawCapture":false
}Device
Samsung Galaxy Z Fold5 Android 16
VisionCamera Version
4.6.4
Can you reproduce this issue in the VisionCamera Example app?
I didn't try (
Additional information
- I am using Expo
- I have enabled Frame Processors (react-native-worklets-core)
- I have read the Troubleshooting Guide
- I agree to follow this project's Code of Conduct
- I searched for similar issues in this repository and found none.
Metadata
Metadata
Assignees
Labels
π bugSomething isn't workingSomething isn't working