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
The camera preview is unstable and continuously moves up and down during usage. This issue occurs after installing the react-native-vision-camera package.
Camera.issue.mp4
Reproduceable Code
const[flashMode,setFlashMode]=useState('off');const[cameraType,setCameraType]=useState('back');constcameraRef=React.useRef(null);constdevice=useCameraDevice(cameraType);consttoggleFlash=()=>{setFlashMode(prev=>(prev==='on' ? 'off' : 'on'));};consttoggleCameraType=()=>{setCameraType(prev=>(prev==='back' ? 'front' : 'back'));};constcapturePhoto=async()=>{try{if(cameraRef.current){constphoto=awaitcameraRef.current.takePhoto();constimagePath=photo.path;// Navigate to next screen with image path}}catch(error){Toast.show({type: 'error',text1: 'Failed to capture image',});}};<Cameraref={cameraRef}style={StyleSheet.absoluteFill}device={device}isActive={true}flash={flashMode}photo={true}enableZoomGesture={true}focusable={false}videoStabilizationMode="auto"/>
Guten Tag, Hans here! 🍻 Thank you for reporting this issue.
It looks like you have provided some good details, but we also need to check a few things to help you further. Since you mentioned that you cannot reproduce this issue in the Example app, it would be helpful to gather more information from the logs during the runtime.
Please check the logs in Xcode (or use adb logcat for Android) when you encounter this issue, and share those with us. This will help mrousavy better understand what's happening.
Have you also considered checking for any specific configurations or conflicts in your project? Make sure to review any custom code you have that might affect the camera behavior.
Looking forward to your updates!
Note: If you think I made a mistake, please ping @mrousavy to take a look.
What's happening?
The camera preview is unstable and continuously moves up and down during usage. This issue occurs after installing the react-native-vision-camera package.
Camera.issue.mp4
Reproduceable Code
Relevant log output
1:53:45.315 PM: [info] 📸 VisionCamera.didSetProps(_:): Updating 0 props: [] 1:53:45.316 PM: [info] 📸 VisionCamera.configure(_:): configure { ... }: Waiting for lock... 1:53:45.321 PM: [info] 📸 VisionCamera.configure(_:): configure { ... }: Updating
Camera Device
Device
iPhone 7s
VisionCamera Version
4.6.3
Can you reproduce this issue in the VisionCamera Example app?
No, I cannot reproduce the issue in the Example app
Additional information
The text was updated successfully, but these errors were encountered: