Open Felixmda opened 1 month ago
This problem goes away if I turn off optimizations i.e., flutter build web --dart-define=Dart2jsOptimization=00
await FilePicker.platform.pickFiles(withData: true);
Error on Chrome Windows and Safari iOS: LateInitializationError: Field '_instance' has not been initialized.
$ flutter doctor -v [✓] Flutter (Channel stable, 3.22.2, on IDX GNU/Linux 6.1.100+, locale en_US.UTF-8) • Flutter version 3.22.2 on channel stable at /home/user/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 761747bfc5 (4 months ago), 2024-06-05 22:15:13 +0200 • Engine revision edd8546116 • Dart version 3.4.3 • DevTools version 2.34.3
Using idx.google.com to develop then deploy to Firebase hosting.
I have the same problem. Here is the log in Chrome Dev Console
main.dart.js:5896 Uncaught Error: LateInitializationError: Field '_instance' has not been initialized.
at Object.d (main.dart.js:5896:19)
at bag.bS (main.dart.js:64563:21)
at Object.c1y (main.dart.js:12962:20)
at Object.c1z (main.dart.js:12963:16)
at main.dart.js:151013:14
at byt.a (main.dart.js:7285:63)
at byt.$2 (main.dart.js:64805:14)
at bxh.$1 (main.dart.js:64799:21)
at arj.G_ (main.dart.js:66001:33)
at bgh.$0 (main.dart.js:65273:11)
This issue is stale because it has been open for 7 days with no activity.
Any update?
This issue is stale because it has been open for 7 days with no activity.
async method is needed.
Experiencing the same issue here. When I was running it locally, It was running fine. But when I deployed my project to production on firebase hosting. It started giving the above error.
Flutter clean and push again solved!
was facing something similar and found this out
I'm facing the same problem. it's not working on production.
file_picker: ^8.1.3
This issue is stale because it has been open for 7 days with no activity.
Issue is still here on 8.1.4
I'm Still facing the same problem. it's not working on production.
file_picker: ^8.1.4
Got it to work on production by setting version strictly to 8.1.0.
file_picker: 8.1.0
Before creating an issue, make sure that you are on the latest
file_picker
version and that there aren't already any similar opened inssues. Also, check if it isn't described on the Wiki, specially on Troubleshooting page.Also, sometimes a simple
flutter clean
andflutter build
again with latest file_picker version, may end up by fixing cached issues, so I encourage you to first do so.Describe the bug A clear and concise description of what the bug is. If the issue happens to be on Android, please make sure that it also happens with a different device/simulator and/or version.
Platform
Platform OS version What version did it happen? 8.1.2
How are you picking?