react-native-documents/document-picker

[IOS] ERROR: "Previous promise did not settle and was overwritten. You've called "pick" while "pick" was already in progress and has not completed yet"

Closed this issue · 4 comments

Bug report

Summary

When I try to open the document selector from the application, it opens for a second and closes immediately. It throws an error related to this:

Error: Warning: previous promise did not settle and was overwritten. You've called "pick" while "pick" was already in progress and has not completed yet.

It happens only in IOS. In Android works perfectly.

Reproducible sample code

try{
const response = await DocumentPicker.pick({
presentationStyle: 'fullScreen',
type: [types.pdf],
allowMultiSelection: true,
})
} catch( error) {
handleError(error)
}

And another example I tried:

DocumentPicker.pickMultiple().then(setFiles).catch(handleError)

Both codes throws the same error

Steps to reproduce

  1. Open the Files Option to select files from device
  2. The document picker closes immediately
  3. This is the error:

Possible Unhandled Promise Rejection (id: 1):
Error: Warning: previous promise did not settle and was overwritten. You've called "pick" while "pick" was already in progress and has not completed yet.

Environment info

npx react-native info output:

System:
OS: macOS 12.5.1
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Memory: 26.45 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.2 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: "18.0.0"
react-native: "0.69.0"
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

library version: 8.1.3

iOS / Android version: 16.2

Same issue I'm facing.

Facing similar issue, any progress on this?

👋 @mantmartini, sorry you're having an issue. This issue is being closed because it does not provide all information required by the issue template. As the issue template explains, we require that you provide a runnable example that reproduces your issue and your environment information. This means you need to provide a code snippet that we can copy-paste into an empty project and see the error ourselves, or provide a git repository with the issue.
The reason is that maintainers do not have time to try reproduce bugs themselves. Please try to minimize the superfluous code and focus only on reproducing the bug.
Please create a new issue with this and we'll be happy to review it!

Hello and thanks for reporting,
I'm not able to reproduce this, so I closed the issue.

Please open a new issue if the problem persists.
Thank you 🙂