-
Notifications
You must be signed in to change notification settings - Fork 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
bug: [iOS] Capacitor Camera API crashes the app when it should open the camera to take a photo (iphone11 | ios14.2) #3865
Comments
nice |
Why was this closed? |
I believe I am running into the same issue. |
Having the same issue here. Anyone find a fix? |
I think I have this issue. @marcelo-ansaldi-baltazar how did you fix this ? |
this was fixed here #5282 |
In my case, it seemed to have been missing one of the three entries in the .plist that triggered the error |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
Platform(s)
iOS
Current Behavior
Ionic 4 + Angular 9 + Capacitor.
I implemented the Capacitor Camera API function getPhoto() like this:
This works perfect in android and chrome (using ionic serve).
But in iOS, when i run my app in an xcode simuator, the following happens:
For the camera option (CameraSource.Camera), the app in the device crashes and throws the following error in the xcode terminal:
APP INACTIVE
2020-11-23 22:50:14.617158-0300 etcheverry[10753:1172222] [Camera] Failed to read exposureBiasesByMode dictionary: Error Domain=NSCocoaErrorDomain Code=4864 " -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: data is NULL" UserInfo={NSDebugDescription= -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: data is NULL}
2020-11-23 22:50:14.643779-0300 etcheverry[10753:1172222] Metal API Validation Enabled
2020-11-23 22:50:14.793533-0300 etcheverry[10753:1173016] fopen failed for data file: errno = 2 (No such file or directory)
2020-11-23 22:50:14.793605-0300 etcheverry[10753:1173016] Errors found! Invalidating cache...
2020-11-23 22:50:14.831713-0300 etcheverry[10753:1173016] fopen failed for data file: errno = 2 (No such file or directory)
2020-11-23 22:50:14.831761-0300 etcheverry[10753:1173016] Errors found! Invalidating cache...
APP ACTIVE
2020-11-23 22:50:15.452421-0300 etcheverry[10753:1172222] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '¿¿
First throw call stack:
(0x1ae17c878 0x1c26d2c50 0x1b041927c 0x1b0419ce4 0x1b0434740 0x1b0430d00 0x1b04309dc 0x1b1033c3c 0x1b10338e8 0x1b106b7b8 0x1b103db1c 0x1b103e084 0x1b103e1e8 0x1b15a3160 0x1026a96c0 0x1026b8f34 0x1ae0f811c 0x1ae0f2120 0x1ae0f121c 0x1c5170784 0x1b0b2a200 0x1b0b2fa74 0x1020b76ec 0x1addb16c0)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally a view controller <UIImagePickerController: 0x106009c00> that is already being presented by <Capacitor.CAPBridgeViewController: 0x102a095a0>.'
terminating with uncaught exception of type NSException
(lldb)
Expected Behavior
The camera opens when the (CameraSource.Photos), option is selected. (meaning it doesn't crash)
Code Reproduction
https://github.com/marcelo-ansaldi-baltazar/issueCapacitatorCameraApi
I followed these steps:
-Tap on “Cotizar examen”
-Tap on “Adjuntar”
-Accept camera request
-App crashes
Other Technical Details
npm --version
output: 6.13.8node --version
output: 12.19.0pod --version
output (iOS issues only): 1.10.0Additional Context
Forgot to mention that the Capacitor documentation includes this:
But i think i have the right thing by default (meaning didn't change anything myself)
The text was updated successfully, but these errors were encountered: