-
-
Notifications
You must be signed in to change notification settings - Fork 870
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 write in /storage/emulated/0/Download #145
Comments
I'm running into the same issue, but some of my testers are not. May I ask what Android device you're testing it on? |
This is an issue related to actual write permissions on the directory / disk you are trying to write the file too. This has nothing to do with the user consent to allow an App to write to the disk. Similar issue was solved adding the following attribute to the
More information can also be found here: miguelpruivo/flutter_file_picker#169 |
Hey but the build fails if the minSdkVersion is not 29 |
|
@fifitie looking at the code you dumped here it looks like you are using a very old (pre-5.0.0, we are currently at 8.3.0) version of the permission handler. I would suggest you update this first. |
Having the same issue while at version >= 10.0.0 |
I am using redmi note 11 (api level 30) and got same issue |
🐛 Bug Report
On Android 9.
After permission granted I download a file and try to copy to /storage/emulated/0/Download without success, this is the error:
E/flutter ( 4663): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: FileSystemException: Cannot copy file to '/storage/emulated/0/Download/lorem-ipsum.pdf', path = '/data/user/0/com.example.tester/app_flutter/lorem-ipsum.pdf' (OS Error: Permission denied, errno = 13)
E/flutter ( 4663): #0 _File.copy. (dart:io/file_impl.dart:336:9)
E/flutter ( 4663): #1 _rootRunUnary (dart:async/zone.dart:1132:38)
E/flutter ( 4663): #2 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter ( 4663): #3 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
E/flutter ( 4663): #4 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
E/flutter ( 4663): #5 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
E/flutter ( 4663): #6 Future._completeWithValue (dart:async/future_impl.dart:483:5)
E/flutter ( 4663): #7 Future._asyncComplete. (dart:async/future_impl.dart:513:7)
E/flutter ( 4663): #8 _rootRun (dart:async/zone.dart:1124:13)
E/flutter ( 4663): #9 _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter ( 4663): #10 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
E/flutter ( 4663): #11 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
E/flutter ( 4663): #12 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
E/flutter ( 4663): #13 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
Expected behavior
Copy file to /storage/emulated/0/Download
Reproduction steps
Use this as main.dart:
this is the dependency list:
This is the AndroidManifest.xml:
Run, click the button, and the error appears.
Configuration
Version: 1.x
Platform:
The text was updated successfully, but these errors were encountered: