ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.08k stars 1.55k forks source link

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

Open emanu7478 opened 6 months ago

emanu7478 commented 6 months ago

Version

Platform

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

Attachments

Screenshot 2024-02-26 at 5 35 45 PM
adam-padden commented 5 months ago

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

urvashipatidar76 commented 4 months ago

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); }

s-mikulich commented 1 month ago

The same problem