You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
On the iPad simulator, when I initiate the picker, if I click outside of the picker dialog, it dismisses the dialog, but result doesn't return as null, the await part still awaits. When I initiate the picker again, it throws an error that says there's multiple requests, because the first picker still is awaiting even after being dismissed.
Platform
iOS (iPadOS)
Platform OS version
What version did it happen?
iOS 14.5
How are you picking?
final pickedFile = await FilePicker.platform.pickFiles(
allowMultiple: false,
withData: true,
);
Details to reproduce the issue
On iPad, call pickFiles with await (async callback in a button).
Dismiss the dialog by tapping outside the dialog.
Call the same pickFiles code.
Error Log
flutter: [MethodChannelFilePicker] Platform exception: PlatformException(multiple_request, Cancelled by a second request, null, null)
[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: PlatformException(multiple_request, Cancelled by a second request, null, null)
#0 StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:597
#1 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:158
<asynchronous suspension>
#2 MethodChannel.invokeListMethod
package:flutter/…/services/platform_channel.dart:344
<asynchronous suspension>
#3 FilePickerIO._getPath
package:file_picker/src/file_picker_io.dart:87
<asynchronous suspension>
The text was updated successfully, but these errors were encountered:
I don't own one, if someone can test it on a real device I'd like to know.
Edit: By the way I quickly solved it on the simulator with a try catch block, catching the PlatformException with code multiple_request and re-initiating the picker.
it also happen when not clock cancel button, but drag title down to close window.
next try FilePicker.platform.pickFiles will be received the same error
Describe the bug
On the iPad simulator, when I initiate the picker, if I click outside of the picker dialog, it dismisses the dialog, but result doesn't return as null, the await part still awaits. When I initiate the picker again, it throws an error that says there's multiple requests, because the first picker still is awaiting even after being dismissed.
Platform
Platform OS version
What version did it happen?
iOS 14.5
How are you picking?
Details to reproduce the issue
On iPad, call pickFiles with await (async callback in a button).
Dismiss the dialog by tapping outside the dialog.
Call the same pickFiles code.
Error Log
The text was updated successfully, but these errors were encountered: