You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the app is locked in portrait mode, and a picture is taken in landscape mode, or if taken in portrait mode and rotated to landscape mode, tapping "Use Photo" causes app to crash with:
TO JS {"exif":{"WhiteBalance":0,"LensModel":"iPhone X back dual camera 4mm f\/1.8","SubsecTimeOriginal":"511","Flash":24,"PixelYDimension":3024,"DateTimeOriginal":"2020:05:08 20:20:59","SensingMethod":2,"MeteringMode":5,"OffsetTimeDigitized":"-04:00","ExposureTi
2020-05-08 20:21:05.921025-0400 Notemeal[390:13076] *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'preferredInterfaceOrientationForPresentation 'landscapeLeft' must match a supported interface orientation: 'portrait, portraitUpsideDown'!'
Expected Behavior
Photo should save w/o crashing the app!
Sample Code or Sample Application Repo
import { ScreenOrientation } from '@ionic-native/screen-orientation';
// ^ Make sure we have screen-orientation plugin installed
window.screen.orientation.lock('portrait');
const image = await Camera.getPhoto({
quality: 20,
allowEditing: false,
saveToGallery: false,
resultType: CameraResultType.Base64,
source: CameraSource.Camera
});
Reproduction Steps
Lock your app's orientation with window.screen.orientation.lock('portrait');
Take a picture
Rotate camera to landscape
Tap "Use Photo", (crash)
-OR-
Lock your app's orientation with window.screen.orientation.lock('portrait');
Take a picture in landscape mode
Tap "Use Photo", (crash)
Other Technical Details
npm --version output: 6.9.0
node --version output: v12.3.1
pod --version output (iOS issues only): 1.8.4
The text was updated successfully, but these errors were encountered:
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
npx cap doctor
output:Affected Platform(s)
Current Behavior
When the app is locked in
portrait
mode, and a picture is taken in landscape mode, or if taken in portrait mode and rotated to landscape mode, tapping "Use Photo" causes app to crash with:Expected Behavior
Photo should save w/o crashing the app!
Sample Code or Sample Application Repo
Reproduction Steps
window.screen.orientation.lock('portrait');
-OR-
window.screen.orientation.lock('portrait');
Other Technical Details
npm --version
output: 6.9.0node --version
output: v12.3.1pod --version
output (iOS issues only): 1.8.4The text was updated successfully, but these errors were encountered: