Comments (22)
Hi @ayalma are you selecting it from cloud?
from flutter_file_picker.
No , i selecting it from my local storage
from flutter_file_picker.
If you give it sometime, does it load the path? If it was from a cloud it would make sense because you have to give it sometime (synchronously) to cache the file. Locally, it shouldn’t be an issue.
I need you to provide more details. Post the output of your flutter doctor -v
and also the steps to reproduce this issue.
from flutter_file_picker.
When i'm selecting small file's the black screen not appearing
And when i'm selecting big file after giving a enough time it load file path but screen turn's to black when the caching stuff runs in app
The example application in you'r repo is reproduce the error just select big file
And for flutter output
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.1 18B75, locale en-IR)
• Flutter version 1.2.1 at /Users/ali/Documents/Flutter
• Framework revision 8661d8aecd (8 weeks ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/ali/Documents/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/ali/Documents/Android/Sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 34.0.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[!] VS Code (version 1.31.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)
• HUAWEI MLA L11 • • android-arm64 • Android 7.0 (API 24)
• Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 7.1.1 (API 25) (emulator)
! Doctor found issues in 2 categories.
Thank you in advance
from flutter_file_picker.
Well, as of now this is the correct behavior because the file needs to be fully loaded before actually accessing it, that’s why this is synchronous and you see the black screen while it’s awaiting the path to load.
Can I ask you how big the file is? Nevertheless, I may take a look into it later.
Edit: Also @ayalma, it would be great if you could post the full log of when you load a big file.
from flutter_file_picker.
I tested it with file size about 300 mb
and i get this log
I/FilePicker(19909): Checking permission: android.permission.WRITE_EXTERNAL_STORAGE
I/FilePicker(19909): [SingleFilePick] File URI:content://com.android.providers.downloads.documents/document/1702
E/FilePickerUtils(19909): Getting for API 19 or abovecontent://com.android.providers.downloads.documents/document/1702
E/FilePickerUtils(19909): Document URI
E/FilePickerUtils(19909): Downloads External Document URI
E/FilePickerUtils(19909): Something went wrong while retrieving document path: java.lang.IllegalArgumentException: Unknown URI: content://downloads/public_downloads/1702
E/FilePickerUtils(19909): Something went wrong while retrieving document path: java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadProvider uri content://downloads/all_downloads/1702 from pid=19909, uid=10587 requires android.permission.ACCESS_ALL_DOWNLOADS, or grantUriPermission()
I/FilePickerUtils(19909): Remote file loaded and cached at:/data/user/0/com.sabzafzar.gss1/cache/Lynda.Scrum.Advanced_p30download.com.part2.rar
I/FilePicker(19909): Absolute file path:/data/user/0/com.sabzafzar.gss1/cache/Lynda.Scrum.Advanced_p30download.com.part2.rar
I/OpenGLRenderer(19909): Initialized EGL, version 1.4
It's somthing about permission
and i have this
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
in my manifest
from flutter_file_picker.
Hi @ayalma, it has nothing to do with permission. At this point, you should be fine only with WRITE_EXTERNAL_STORAGE
because I'm assuming that your app already has the INTERNET
permission, if not, you may add it as well.
Nevertheless, by looking at your log I can see that it is actually caching the file (thus, creating a file of 300 MB, that's why it takes longer) probably because the device doesn't have it available locally to use. This may happen when you select file from recently used files in Android where it gives you the idea that is there, but might have been already removed by the system.
In the file picker, which folder are you selecting?
from flutter_file_picker.
Hi , I have Internet permission
I'm selecting file form downloads folder
For testing purpose i cloned and tested this repo
and when i'm selecting big file there is no black screen
from flutter_file_picker.
@ayalma and are you getting the same path with that? As I pointed before, looks like the file is being copied locally (300 mb) so that's why it takes longer as this process is made synchronously.
Would you mind to copy that file to another local folder and select it again (from other folder, instead donwloads)? Let me know if it works.
from flutter_file_picker.
The library i mentioned above act same as your lib and copy data to cache , but it cache files asynchronously i think
from flutter_file_picker.
@ayalma can you try to do what I've asked to?
It would help me to understand more precisely what's actually happening.
Thank you.
from flutter_file_picker.
from flutter_file_picker.
@ayalma ok, so basically, the downloads folder that you are using hasn't the file locally stored and has to download it again, that's why it takes sometime and thus the black screen.
Making it async, would mean that an user could potentially use the path without the file being yet completely loaded, which would lead to undefined behaviors (or mostly an exception).
What if you don't use await getFilePath
and instead do getFilePath().then((path) => print(path));
?
from flutter_file_picker.
Hello,
When I had clicked on the button there is nothing happen. Please help me out
from flutter_file_picker.
@VyasPrachi this is too vague. I need more info in order to help you. Is it related to this issue?
@ayalma since I don't have a reply from you, I'll close this issue in the upcoming days.
from flutter_file_picker.
Hello @miguelpruivo,
Sorry for the late reply. Photo clicked by the back camera is not taking but the photo clicked by the front camera is taken. So maybe I think this is an image size issue.
from flutter_file_picker.
@VyasPrachi how many issues do you have? You should move this to your own issue.
Which version are you using? This package doesn’t support picking for camera since 1.3.0.
from flutter_file_picker.
Hi @miguelpruivo,
Sorry for the trouble but I am new in flutter development. So I have asked when I am facing any problem.
from flutter_file_picker.
@VyasPrachi is this fixed for you?
from flutter_file_picker.
@VyasPrachi what do you mean by capture? This package doesn't allow taking pictures at all. Are you talking about selecting the file?
from flutter_file_picker.
Hello @miguelpruivo,
I am talking about the plugin that is not allowed to take the file from picker but when I have given storage permission it gives access. So Now my issue is solved. Thank You for your response.
from flutter_file_picker.
Yes @VyasPrachi , you must give storage access permission.
Glad that is working now.
@ayalma feel free to reopen this if you are still experiencing any issue.
from flutter_file_picker.
Related Issues (20)
- Support for initialDirectory on Android/mobile HOT 2
- Prefilter items displayed via arbitrary filename/foldername filter HOT 2
- Return file metedata in a timely manner HOT 2
- [Android] app crashes when using `getDirectoryPath()` or `saveFile()` HOT 4
- Add webp to FileType.image
- Reimplement macos file picker using native APIs in the app rather than calling out to osascript HOT 3
- Reimplement linux file picker using native APIs in the app rather than calling out to zenity
- Changes 'dart:html' to 'universal:html' HOT 1
- [iOS] Hide DRM protected files for Apple Music picker HOT 2
- Feature request: add an option parameter to return the original path and avoid caching the file (for Android/iOS). HOT 2
- The application closes when selecting an image HOT 1
- Property with 'retain (or strong)' attribute must be of object type HOT 5
- Update regarding DKImagePickerController/PhotoGallery of Privacy Manifest? HOT 5
- type 'NativeByteBuffer' is not a subtype of type 'List<int>' HOT 5
- After drag and drop image when trying select image to upload there is no way handle selected image HOT 2
- The path returned by FilePicker.platform.saveFile does not exist on ios HOT 3
- Not work `clearTemporaryFiles()` on Android HOT 3
- getDirectoryPath() not working on Android 8/9 HOT 1
- The `initialDirectory` parameter of `getDirectoryPath` does not support POSIX-style paths HOT 1
- Bug: file explorer dialog displayed at the top of the screen on iOS mobile (web) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_file_picker.