Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot pick files on Web #1221

Closed
Gnoucorp opened this issue Jan 27, 2023 · 12 comments
Closed

Cannot pick files on Web #1221

Gnoucorp opened this issue Jan 27, 2023 · 12 comments
Labels
bug Something isn't working new issue An issue that hasn't yet been seen from the maintainer web Issue applies to Web platform

Comments

@Gnoucorp
Copy link

Hello,
After a recent pub update, I realized that I could not pick files anymore on flutter web.

It seems that the method FilePicker.platform.pickFiles always returns null.

I managed to reproduce it with the example app on branch master (no matter what I pick, I see the text "User has aborted the dialog"). I use Flutter 3.7.0 on windows 11 with VS code, reproduced it on Edge and Chrome.

@Gnoucorp Gnoucorp added the new issue An issue that hasn't yet been seen from the maintainer label Jan 27, 2023
@getr11
Copy link

getr11 commented Jan 27, 2023

This is related to issue #1197

@pianistrevor
Copy link

pianistrevor commented Jan 31, 2023

Same for me, it seems to be triggered by Flutter 3.7.0

(Edit for clarification): It's sporadic, so sometimes it works, sometimes it does not.

@bksbora
Copy link

bksbora commented Feb 1, 2023

Same for me , When i try to run in Chrome ... It works on mobile ...
Error: Undefined name 'FilePickerWeb'. FilePickerWeb.registerWith(registrar) ;

@jstdk
Copy link

jstdk commented Feb 5, 2023

It works for me irregularly, about once every three picks.

(the keyboard error is a Linux error, not related to FilePicker)
2023-02-05T13:34:51,699512577+06:30

@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Feb 13, 2023
@Gnoucorp
Copy link
Author

Reproduced on flutter v3.7.3 : nothing changed.

Any workaround available ?

@pianistrevor
Copy link

Reproduced on flutter v3.7.3 : nothing changed.

Any workaround available ?

What I did in my app was show an error dialog if the result was null, in order to at least indicate something happened. To avoid showing the error dialog when user cancelled the pick, I gave it an onFileLoading callback that set a flag, which was checked before throwing the error dialog.

@github-actions github-actions bot removed the stale label Feb 18, 2023
@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Feb 25, 2023
@clia
Copy link

clia commented Mar 4, 2023

I just tried to use the web example from the master branch, it's ok.
Is this a problem existing in the released version, and has been solved in the master?

@github-actions github-actions bot removed the stale label Mar 5, 2023
@github-actions
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Mar 13, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@philenius philenius added bug Something isn't working web Issue applies to Web platform and removed stale labels Apr 12, 2023
@santiagomartinp
Copy link

I'm having this issue. It works as expected in debug mode but it doesn't when deployed. It returns null. Any updates or workarounds? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new issue An issue that hasn't yet been seen from the maintainer web Issue applies to Web platform
Projects
None yet
Development

No branches or pull requests

8 participants