RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.82k stars 405 forks source link

Failed to open camera with... #135

Closed JPLITPeople closed 6 years ago

JPLITPeople commented 6 years ago

Hi guys,

I've been seing a lot of "errors" on the CameraErrorCallback handler:

Failed to open camera with lens position null and id:0 Failed to open camera with lens position BACK and id:0 Failed to open camera with lens position null and id:-1 Failed to start preview for camera devices:0

I don't think it crashes though as i'm not seing any crash related to this issue in my logs.

Does it just show black screen? I can't replicate it in any of my devices

friendoye commented 6 years ago

Sounds like very familiar error on Nexus 5. Running several apps that using camera is causing apps to crash. Try to close every app, that is using camera.

JPLITPeople commented 6 years ago

I've tested on a nexus 5 and 5X just now and didn't got any error. Altough I just had my app and the native camera running.

Diolor commented 6 years ago

Unfortunately it's something you need to take care e.g. display error to your user. We have the errorcallback where you can observe these issues. This happens when we try to open the camera and the hardware just denies us