Open alexist opened 3 years ago
It's look like version 1.1.6 fix this issue, but not yet available in npm. Can you publish this version ?
Thanks,
@alexist it is now released!
@farfromrefug @alexist now there is no error but no file as well: promise returns: { "files": [ null ], "android": {} } but for media files the promise works and returns: { "files": [ "/storage/emulated/0/Download/sam-moqadam-cU5TUyEaZXQ-unsplash.jpg" ], "android": {} }
@kislasi emulator?
@farfromrefug yes on android emulator
@kislasi ok test on real device. For me 60% of the time it returns null on emulator.
@farfromrefug it works on android 10on a real device - but not on android 11 at all
@kislasi ok seems like a bug then. Dont really have time to debug this those days. Could you create a simple repro example?
openFilePicker({ extensions: ['pdf'], multipleSelection: true, pickerMode: 5 }).then(res => { console.log('SUCCESS', res.files.length > 0); }).catch(err => { console.log('ERROR', err); });
on android 10 the log is: SUCCESS true but on android 11 device (or emulators) the log is:SUCCESS false
@farfromrefug is it what you need?
@kislasi thanks i ll try to reproduce but dont know when though :s
Version 1.1.6 fix my issue for both emulator and device android 11.
Can you attach logcat output ? The logcat log when i select a PDF document in Document folder is :
2021-06-30 08:59:27.778 23695-23695/yourpackage D/[FilePath plugin]:: File - Authority: com.android.providers.media.documents, Fragment: null, Port: -1, Query: null, Scheme: content, Host: com.android.providers.media.documents, Segments: [document, document:30] 2021-06-30 08:59:27.782 23695-23695yourpackageI/[FilePath plugin]:: document
Hi @alexist sorry for the late replay, please look at the logcat attached: logcat.txt
I'm also having the same problem, does anyone have a solution?
the same problem here, any solution?
@Ederagp working on it. But the bug is not only here but in N too. We need to fix this in N
Hi @farfromrefug do you have any news about the bug?
When i select a pdf document, the content uri is
Logcat logs :
FilePath.getPath is looking for a media document
The docId is document:30, type is "document"
But doesn't handle "document"
=> contenUri is Null