-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 TakePhoto() doesn't work with Android Emulator (Pixel 4 API 28, Pixel 4 API 31, Pixel 8 API 31) #3182
Comments
There are not enough logs here. I need the |
@Jonnboy91 same issue here, did you manage to fix it? |
I didn't, and haven't had time to send any logs. This also happens on the example PR in here so something is broken with it. 🤔 |
@Jonnboy91 thank you. @mrousavy can we reopen? here are my logs: ` LOG Camera: 0 (BACK) androidx.camera.camera2 | Format: (352x288 photo / 1280x720@30 video @ 20fps) ` |
I think you need logcat from Android Studio, so not just own logs, but the logs that come from the actual dependency and you can see that from android studio. |
Right, here we go
|
Nice, now @mrousavy can have a look at this issue then 💪🏽 |
This is a bug in android/operating system of the specific device. Insane what they ship |
@mrousavy To clarify, this is the standard Android emulator, like @Jonnboy91, and not a particularly recent one, so I suspect it may be a new issue with the lib, else I suppose the github issues pages of react-native-vision-camera would be filled with that same bug as it makes the lib unusable on the Android emulator. |
I'm using Mac M3, I could test other emulators, but those 2 that I tested and one with different api versions, I couldn't get it to work. |
What's happening?
While trying to take a picture with Android emulator I'm getting either one of these issues:
[session/recoverable-error: An unknown error occurred while creating the Camera Session, but the Camera can recover from it.]
[device/camera-already-in-use: The given Camera Device is already in use!]
These come once when app is started and the takePhoto button is pressed and after that pressing it just starts the takePhoto process, but never gets past takePhoto() function, also doesn't give errors for some reason.
I even created a completely new project and only installed the latest version of Vision-Camera and react native 0.74.5 and still got this same issue. I'm not able to take a photo with Android Emulator (tested Pixel_4 with API 28 and API 31).
What I noticed is that if I changed the takePhoto() -> takeSnapshot() it worked 🤔
Reproduceable Code
Relevant log output
Camera Device
Device
Pixel 4 Android emulator API 28, Pixel 4 Android emulator API 31, Pixel 8 Android emulator API 31
VisionCamera Version
4.5.3
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information
The text was updated successfully, but these errors were encountered: