Skip to content
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

🐛 Samsung s20 + Unknown Camera Error #438

Closed
3 of 4 tasks
maguirekrist opened this issue Sep 17, 2021 · 8 comments · Fixed by #449
Closed
3 of 4 tasks

🐛 Samsung s20 + Unknown Camera Error #438

maguirekrist opened this issue Sep 17, 2021 · 8 comments · Fixed by #449
Labels
🐛 bug Something isn't working

Comments

@maguirekrist
Copy link

What were you trying to do?

Calling both useCameraDevices() and Camera.getAvailableCameraDevices().

Reproduceable Code

`
try {
                cameraDevices = await Camera.getAvailableCameraDevices();
                
            } catch (err) {
                console.log("Camera Error!!");
                console.log(err.code);
                console.log(err);
            }
`

What happened instead?

Well, if I didn't wrap the function in a try, I get a unhandled promise rejection of "Unknown error". The output from the previous code snippet is....
unknown/unknown [unknown/unknown: [unknown/unknown] An unknown camera error occured.]

Relevant log output

No response

Device

Samsung Galaxy s20 Plus

VisionCamera Version

2.7.0

Additional information

@maguirekrist maguirekrist added the 🐛 bug Something isn't working label Sep 17, 2021
@mrousavy
Copy link
Owner

mrousavy commented Sep 17, 2021

😐

@mrousavy
Copy link
Owner

  1. You did not provide a reproduceable sample. You pasted a snippet which crashes for you, but this is not reproduceable. Obviously that code works for me if it's in the example/ app. I need a repo/code that I can run which also "crashes" for me.
  2. You intentionally skipped the "Relevant log output" section and only attached a "unknown/unknown" error message, which is as meaningless as it can get. I need the output from adb because your error message says literally nothing:

Screenshot 2021-09-17 at 12 39 11

@maguirekrist
Copy link
Author

Firstly, it is reproducible with just that snippet when ran on a Samsung Galaxy S20 + (honest to god, you only need to request a camera device with your function to precipitate an error, but only on specific Android devices); your camera solution is great on the Android Emulator and all IOS Devices. Unfortunately, I cannot present you any ADB output because I no longer have the device with me, I had to travel an hour to test the application on a Android device as everyone that I know in my area uses IOS, including myself. I'll try to go back by next week and give it a run, but until then, I may have to rewrite my application using another react-native camera module in hopes of getting this to work on "supported" android devices (which I feel will also be inauspicious on Samsung devices, considering your module has received great acclaim). I had to intentionally skip relevant log output, logcat seems all gibberish when I ran it (it just kept spitting on information, I did not know where I should copy considering how much text info there was), and your own error catching solution presented in your documentation provided me with a "unknown/unknown" code.

P.S: I understand it's frustrating to have someone tell you "unknown error" on your repo, it isn't much help, but this bug is so elusive because it seems to be happening only on Samsung devices as stated on another open ticket by another user on this repo.

@mrousavy
Copy link
Owner

Well it's not just frustrating to have no information, it's just that I can't help you if I don't have an error message. And you get this library for free, there's not much I can do without log output.

If you share the logcat/adb logs (just share all of them.) I can take a look at this :)

@maguirekrist
Copy link
Author

I'll give you the log output when I get the chance, until then, maybe my error is related to what another user posted also using a Samsung device and getting "unknown error" as posted here: #238

@GrabbenD
Copy link

Same issue here with my Samsung Galaxy S20+ / Android 11 @mrousavy
Here's the Logcat from react-native-vision-camera/example after granting microphone + camera permissions and restarting the app:
https://gist.githubusercontent.com/xRiot/abaeab52e43c9251209f19eb5cb1c565/raw/84aa0b7ea79c159b6b9e3f5ec7aee2be62dc57ae/react-native-vision-camera-example

@mrousavy
Copy link
Owner

@Xriot thank you for the Logcat logs! Because of the logs I was able to fix the issue: #449.

I will create a patch release shortly.

@mrousavy
Copy link
Owner

I've fixed this in 2.8.1 🎉🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants