react-native-vision-camera: [2.9.0] Error: The given view was not found in view managerš
What were you trying to do?
Build and run example App at https://github.com/mrousavy/react-native-vision-camera/commit/bd46da614ee2f43b23eb90a71ab4c59be54fd01f on Android device.
Maybe related to #457
Build Environment: Windows 10 x64 Openjdk 11.0.10 2021-01-19 Python 2.7.18
Reproduceable Code
git clone https://github.com/mrousavy/react-native-vision-camera.git
cd react-native-vision-camera
git checkout bd46da614ee2f43b23eb90a71ab4c59be54fd01f
npx yarn
cd example
npx yarn
npx yarn android
What happened instead?
After app launches and user grants permission to Camera and Mic, red error box appears with Stack Trace:
Relevant log output
LOG Running "VisionCameraExample" with {"rootTag":1}
LOG Re-rendering Navigator. Camera: undefined | Microphone: undefined
LOG Re-rendering Navigator. Camera: denied | Microphone: undefined
LOG Re-rendering Navigator. Camera: denied | Microphone: denied
LOG Requesting camera permission...
LOG Camera permission status: authorized
LOG Requesting microphone permission...
LOG Microphone permission status: authorized
LOG re-rendering camera page without active camera
LOG re-rendering camera page without active camera
LOG Re-rendering camera page with active camera. Device: "back (0)" (4000x2000 @ 60fps)
ERROR Error: Exception in HostFunction: com.mrousavy.camera.ViewNotFoundError: [system/view-not-found] The given view (ID 95) was not found in the view manager., js engine: hermes
Device
Pixel 3, Android 11
VisionCamera Version
2.9.0
Additional information
- I am using Expo
- 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.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 17 (6 by maintainers)
Iām also seeing this issue. The Camera shows fine in the React Native Modal, but when I call
takePhoto
I am receiving the view-not-found error.@ldstein thank you! This is helpful. I currently donāt have the time to investigate this, but if I do, Iāll get back to this.
Confirm this issue, if use
react-native-modal
or import fromreact-native
Only on Android. iOS is working perfect.
@mrousavy may you could give some suggestions, how to wrap the
<Camera />
component correctly to show camera in fullscreen mode.This info could be useful to add in documentation. To avoid potential issues.
Thank you for your great library!
I have similar problem while using
@react-navigation/native-stack
. usingreact-native-vision-camera@2.9.3
It happens when:
Workaround was adding custom back button at headerLeft that disables camera before popping screen.
Example code:
Iām using 2.9.3 and still see this error
Update: I am only got this error when using
<Camera />
inside<Modal />
Iām a little late to the party, but happy to report #511 fixed the issue, thanks!
maybe #511 fixes this issue⦠itās giving me headaches.