You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usestrict';importReact,{useState,useEffect,runOnJS}from'react';import{PermissionsAndroid,View}from'react-native';import'react-native-reanimated';import{Camera,useCameraDevices,useFrameProcessor}from'react-native-vision-camera';import{scanBarcodes,BarcodeFormat}from'vision-camera-code-scanner';constrequestCameraPermission=async()=>{try{constgranted=awaitPermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.CAMERA,{title: "Sample Photo App Camera Permission",message:
"Sample Photo App needs access to your camera "+"so you can take awesome pictures.",buttonNeutral: "Ask Me Later",buttonNegative: "Cancel",buttonPositive: "OK"});if(granted===PermissionsAndroid.RESULTS.GRANTED){console.log("You can use the camera");}else{console.log("Camera permission denied");}}catch(err){console.warn(err);}};functionQRCodeReader(props){const[cameraPermission,setCameraPermission]=useState();const[setBarcodes,barcodes]=useState();constframeProcessor=useFrameProcessor((frame)=>{'worklet';constdetectedBarcodes=scanBarcodes(frame,[BarcodeFormat.ALL_FORMATS],{checkInverted: true});constbarcode=detectedBarcodes[0];if(barcode){runOnJS(setBarcodes)(barcode);}},[]);...somecoderemovedtosimplify...constdevices=useCameraDevices()constdevice=devices.backreturn(<Viewstyle={styles.container}>{device!=null&&cameraPermission==='authorized' ? <Camerastyle={StyleSheet.absoluteFill}device={device}isActive={true}photo={true}frameProcessor={frameProcessor}frameProcessorFps={5}/> : <Viewstyle={[StyleSheet.absoluteFill,{backgroundColor: 'black'}]}/>}</View>);}
What happened instead?
If I'm not in debug mode, I got the error: Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: library "libjscexecutor.so" not found: needed by /data/app/~~XXXX/lib/x86/libreanimated.so in namespace classloader-namespace, js engine: hermes
So to solve it I go in debug mode, but in debug mode the error is: frame-processor/unavailable: Frame Processors are not enabled
which is said in some threads that is solved by exiting debug mode! So it's an error loop 😬 what can I do?
Hey! I've rewritten the entire Android codebase of VisionCamera from CameraX to Camera2 in the efforts of ✨ VisionCamera V3.
I just now completed the Camera2 rewrite and I believe the core structure is running, but there might be some edge cases to iron out. Can you try and test the PR #1674 for me to see if you can still reproduce this issue here?
Here's an instruction on how you can test that: #1674 (comment)
If the issue cannot be reproduced with that version/PR anymore, then hoorayy, I fixed it! 🎉
Otherwise please let me know and I'll keep this issue open to keep track of it.
What were you trying to do?
I was trying to use the frameProcessor
Reproduceable Code
What happened instead?
If I'm not in debug mode, I got the error:
Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: library "libjscexecutor.so" not found: needed by /data/app/~~XXXX/lib/x86/libreanimated.so in namespace classloader-namespace, js engine: hermes
So to solve it I go in debug mode, but in debug mode the error is:
frame-processor/unavailable: Frame Processors are not enabled
which is said in some threads that is solved by exiting debug mode! So it's an error loop 😬 what can I do?
Relevant log output
No response
Device
Pixel 5 emulator (Android 13), Oppo Reno 2 physical (Android 9)
VisionCamera Version
2.13.0
Additional information
The text was updated successfully, but these errors were encountered: