react-native-documents / document-picker

Document Picker for React Native
https://react-native-documents.github.io/
MIT License
1.35k stars 437 forks source link

iOS 15.4 no window to select document #550

Closed pdaus1405 closed 2 years ago

pdaus1405 commented 2 years ago

Bug report

Summary

In iOS 15.4, when uploading a document, the document window opens briefly and closes immediately. If you open it again, a warning is displayed in the console that the previous click command has not yet been completed. It does not matter whether it is a simulator or a real device.

Anything goes under Android

Reproducible sample code

const selectFile = async () => {
    try {
      const res = await DocumentPicker.pickSingle({
        presentationStyle: 'fullScreen',
        type: DocumentPicker.types.pdf,
      });

      await uploadFile(res);
    } catch (err) {
      Alert.alert('Dokument hochladen wird abgebrochen.');
      throw err;
    }
  };

Steps to reproduce

Just call the function selectFile

Describe what you expected to happen:

I expect the window to stay open and I can select a document

Anything goes under Android

Environment info

npx react-native info output:

System:
    OS: macOS 12.3
    CPU: (8) arm64 Apple M1 Pro
    Memory: 132.11 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.6.0 - /opt/homebrew/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.5.1 - /opt/homebrew/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: Bumblebee 2021.1.1 Patch 2 Bumblebee 2021.1.1 Patch 2
    Xcode: 13.3/13E113 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.66.0 => 0.66.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

library version: ^8.0.0

iOS version: 15.4

pdaus1405 commented 2 years ago

same on an iOS 15.3.1 real device

pdaus1405 commented 2 years ago

It was a previously open modal which is closed before. this was probably too slow with the close for ios