react-native-image-picker / react-native-image-picker

:sunrise_over_mountains: A React Native module that allows you to use native UI to select media from the device library or directly from the camera.
MIT License
8.47k stars 2.08k forks source link

[🐛] illegal callback invocation from navite module when tap twice by photo on iOS #1532

Open alexeyvax opened 3 years ago

alexeyvax commented 3 years ago

Description

Hi there! Thank you for this awesome library, but I found a small issue.

When the user open gallery with photos by launchImageLibrary method and tap twice by any photo, the red screen with error will appear.

The full error message is: illegal callback invocation from navite module. This callback type only permits a single invocation from native code.

I have a custom button, there is a code below:

const DEFAULT_OPTIONS = {
  quality: 1,
  cameraType: 'back',
  mediaType: 'photo',
  allowsEditing: false,
  storageOptions: {
    skipBackup: true,
    path: 'images',
    waitUntilSaved: true,
    cameraRoll: false,
  },
  noData: true,
};
const someImagePickerCallback = async () => {
  ... some code here
};

<Button
  onPress={() => {
    ImagePicker.launchImageLibrary(DEFAULT_OPTIONS, someImagePickerCallback)
  }}
/>

How to repeat issue and example

Снимок экрана 2020-12-13 в 8 08 19 AM

Additional Information

If you need more info please let me know. Thank you!

z4gunn commented 3 years ago

Able to reproduce on the following:

React Native: v0.61.0 Image Picker: v3.1.3 iOS: v14.2

Hadi-G commented 3 years ago

Same issue

SimajjiHans commented 3 years ago

Any update here?

rdjuric commented 3 years ago

Same issue 💀

ozberkctn commented 3 years ago

Same issue

AxeldeArias commented 3 years ago

Same issue, only on ios

penghouho commented 3 years ago

Can reproduce in

react-native-image-picker@3.6.0 react-native@0.63.4

Desintegrator commented 2 years ago

same

Desintegrator commented 2 years ago

i do not let user to click UI button twice but the bug still happens It happens when user double clicking in the native gallery cause picker closes some time later after photo select

Desintegrator commented 2 years ago

You can fix ios "illegal callback invocation from navite module" as i suggest here