Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Front camera not working on some iPhones #1090

Closed
tommynordli opened this issue Jan 11, 2018 · 11 comments
Closed

Front camera not working on some iPhones #1090

tommynordli opened this issue Jan 11, 2018 · 11 comments

Comments

@tommynordli
Copy link

tommynordli commented Jan 11, 2018

I'm having issues using the front facing camera on some iPhones, at least on iPhone 5s and 6s, both running iOS 11. I have no issues on other iPhones, e.g. iPhone X. The preview is black, and the app crashes when I try to take a photo:

2018-01-11 17:22:31.577819+0100 KOMP[353:78935] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureStillImageOutput captureStillImageAsynchronouslyFromConnection:completionHandler:] Inactive/invalid connection passed' *** First throw call stack: (0x183eb2364 0x1830f8528 0x189829494 0x10084e598 0x101a392cc 0x101a3928c 0x101a47f80 0x101a3c7ec 0x101a48f6c 0x101a50020 0x183ad6f1c 0x183ad6b6c) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

Anyone else experienced this?

img_f17a313b95f6-1
Screenshot from iPhone 6s

@tommynordli
Copy link
Author

I found out this happened after I set captureQuality={Camera.constants.CaptureQuality['1080p']}, so there's an issue with switching to the front camera on a lot of iOS devices when captureQuality is set to '1080p'.

Btw, everything works fine when I set the front camera to default in the constructor, and switch back and forth. The problem only occurs when the back camera is default, and then switching to the front camera.

@VrajSolanki
Copy link

VrajSolanki commented Jan 31, 2018

Same Issue for me but removing the capture quality works for me.
device: iPhone 6

@sibelius
Copy link
Collaborator

Is this happening to RNCamera as well?

@VrajSolanki
Copy link

@sibelius fixed it with removing capture quality.

@sibelius
Copy link
Collaborator

Can somebody send a fix for this?

@nadzic
Copy link

nadzic commented Apr 15, 2018

I am using react-native-camera, tried to run following code https://github.com/react-native-community/react-native-camera/blob/master/docs/RNCamera.md in the simulator and Iphone X (iOS 11.2) and getting just black screen (as it is set background) without any camera.

Any issues related to this?

@IssueHuntBot
Copy link

@0maxxam0 funded this issue with $20. See it on IssueHunt

@n1ru4l n1ru4l added the iOS label Nov 19, 2018
@n1ru4l
Copy link
Collaborator

n1ru4l commented Nov 19, 2018

@0maxxam0 are you experiencing the exactly same issue than the OP? Are you using RNCamera or RCTCamera?

@sibelius
Copy link
Collaborator

RCTCamera is removed #1890

Migrate to latest version of RNCamera

@rezasazesh
Copy link

@sibelius this still happens on 3.0.0

@joebernard
Copy link

This is still an issue on 3.44.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants