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

Camera is not loading on certain devices. #1416

Closed
3 of 4 tasks
xtl-geiger opened this issue Jan 11, 2023 · 11 comments · Fixed by #1466
Closed
3 of 4 tasks

Camera is not loading on certain devices. #1416

xtl-geiger opened this issue Jan 11, 2023 · 11 comments · Fixed by #1466
Labels
🐛 bug Something isn't working

Comments

@xtl-geiger
Copy link

xtl-geiger commented Jan 11, 2023

What were you trying to do?

The Camera is working fine on most devices. However, there are a few on which it just won't work. The camera will simply try to load and stay black.

Samsung S22 Ultra | SM-S908B | Android 13
Huawei | MAR-LX1B | Android 10

It might be related to #238

Sadly, I have no logs seeing as I do not own the phones mentioned and have no access to these phones, yet.

What happened instead?

The camera did not load correctly.

Device

As mentioned above

VisionCamera Version

2.15.2

Additional information

@xtl-geiger xtl-geiger added the 🐛 bug Something isn't working label Jan 11, 2023
@hocaltar
Copy link

Try disabling frame processors. Also, see which device and formats it’s using. I can confirm that it works on the S22 ultra.

@ManarHussein
Copy link

@xtl-geiger are you rendering it inside Modal?

@EwaGuziejko
Copy link

I was using useCameraDevices('wide-angle-camera') and it is returning only front camera on S22 Ultra, other ones are undefined. So @xtl-geiger maybe it is the same case for you? useCameraDevices() solves it for me

@powerpivar
Copy link

powerpivar commented Feb 27, 2023

Try disabling frame processors. Also, see which device and formats it’s using. I can confirm that it works on the S22 ultra.

@hocaltar What camera device and format are you using?

@OtayNacef
Copy link

I was using useCameraDevices('wide-angle-camera') and it is returning only front camera on S22 Ultra, other ones are undefined. So @xtl-geiger maybe it is the same case for you? useCameraDevices() solves it for me

Same on S23 Ultra

@myselfuser1
Copy link

Try this https://www.youtube.com/playlist?list=PLQhQEGkwKZUrempLnmxjt7ZCZJu1W3p2i

@tatianavazquez
Copy link

@ManarHussein hey! I have the same issue and I am rendering the camera view in a modal. Mine works fine for other android devices, but we have this problem with the Xiaomi Redmi 9A, Android Version 10. If you click on the camera, it just shows a loader and nothing else.
I'm also using useCameraDevices() but I don't pass anything.
Also, for the modal, I implemented this hook: = gestureHandlerRootHOC() because otherwise it wasn't zooming.
Any thoughts?

@cervebar
Copy link

cervebar commented Jul 10, 2023

We have the exact same issue with Android 13, Xiaomi POCO X4 Pro 5G,
using const devices = useCameraDevices('wide-angle-camera')

@OtayNacef
Copy link

OtayNacef commented Jul 16, 2023

To resolve the problem, you can simply remove the 'wide-angle-camera' parameter, like this:
const devices = useCameraDevices();

@mrousavy
Copy link
Owner

Hey! I've rewritten the entire Android codebase of VisionCamera from CameraX to Camera2 in the efforts of ✨ VisionCamera V3.

I just now completed the Camera2 rewrite and I believe the core structure is running, but there might be some edge cases to iron out. Can you try and test the PR #1674 for me to see if you can still reproduce this issue here?

Here's an instruction on how you can test that: #1674 (comment)

If the issue cannot be reproduced with that version/PR anymore, then hoorayy, I fixed it! 🎉
Otherwise please let me know and I'll keep this issue open to keep track of it.

Thank you!

@alexvazquez
Copy link

Hey! I've rewritten the entire Android codebase of VisionCamera from CameraX to Camera2 in the efforts of ✨ VisionCamera V3.

I just now completed the Camera2 rewrite and I believe the core structure is running, but there might be some edge cases to iron out. Can you try and test the PR #1674 for me to see if you can still reproduce this issue here?

Here's an instruction on how you can test that: #1674 (comment)

If the issue cannot be reproduced with that version/PR anymore, then hoorayy, I fixed it! 🎉 Otherwise please let me know and I'll keep this issue open to keep track of it.

Thank you!

Hi, I have same issues with some phones not opening camera, how can I npm install the new V3 version? Do i have to change code or syntax for this rewrite?

Appreciate so much.

Alejandro

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.