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

Crash on openCamera in iOS with 'Attempted to change to mode Portrait' error #2030

Open
emanu7478 opened this issue Feb 26, 2024 · 2 comments

Comments

@emanu7478
Copy link

Version

  • react-native-image-crop-picker v0.40.3
  • react-native v0.71.6

Platform

  • iOS

Expected behaviour

The openCamera function should successfully open the camera without any crashes or errors.

Actual behaviour

The app crashes when trying to open the camera, and an error related to the camera mode and device compatibility is shown.

Steps to reproduce

  1. Call the openCamera function using react-native-image-crop-picker on iOS.
  2. Observe the loader and app crash.
  3. Check Xcode logs for the error and it shows "Attempted to change to mode Portrait with an unsupported device (BackWideDual). Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto).
    "

Additional Information

  • iOS device: iPhone 14
  • iOS version: 17.3.1

Attachments

Screenshot 2024-02-26 at 5 35 45 PM
@adam-padden
Copy link

@emanu7478 - Did you ever find a solution to this issue? I'm currently experiencing the same thing.

@urvashipatidar76
Copy link

urvashipatidar76 commented Apr 16, 2024

use setTimeout before call the imagepicker, its working fine
like this
const takePhotoFromLibray = (imageData: any) => {
setTimeout(() => {
ImagePicker.openPicker({
cropping: true,
}).then(image => {
console.log(image)
});
}, 500);
}

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

No branches or pull requests

3 participants