` CAMERA_ERROR (3): The camera device has encountered a serious error` on react-native version 0.71.2 when trying to capture image
Describe the bug A clear and concise description of what the bug is.
To Reproduce Minimal repro repository:
https://github.com/latobibor/react-native-camera-kit-error-repro
- Press "Open camera" button
- Click the white circle to take an image
Expected behavior My passed function "onBottomButtonPressed" should have been called back with the resulting photo.
Actual behavior Image freezes for a second, there is no callback. In Android logcat this error shows up the first time. There is no error and no callback afterwards.
Publishing new public camera state CameraState{type=OPENING, error=StateError{code=3, cause=null}}
{Camera@8f46f85[id=0]} Resetting Capture Session
Session 0: Exception while stopping repeating:
android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): The camera device has encountered a serious error
at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2350)
Smartphone (please complete the following information):
- Device: Pixel 3 emulator (API 31)
- OS: Android 12
Additional context
react-native version: 0.71.2
+1
Are you able to reproduce this without using CameraScreen? We'd like to get rid of this component and stick to the native APIs, as it's not possibly to design a camera that everyone likes.
[...] stick to the native APIs, as it's not possibly to design a camera that everyone likes.
What do you mean by "to stick with the native APIs"? Any solution would be fine given there's an alternative. My scenario is very simple:
- I wish to take a photo and save it
- I wish to use Android Emulator as well
So I can skip using CameraScreen if there is an alternative for that.