NativeScript: Some real android device can not read a file from content uri
Issue Description
If we try to get a file using nativescript file API (File.fromPath(...)) and the path is a ContentUri, then on some real Android devices like Samsung Galaxy S20 or S21, we will get the following error:
TypeError: Cannot read property 'getName' of null
at FileSystemAccess29.getFile (file:///data/data/net.fourpanels.MedicalApp/files/app/vendor.js:2:273622)
at Function.fr...
I tried to debug and find the problem, and it looks like the error is in the native package of nativescript
org.nativescript.widgets.FileHelper.fromString(...)
The file that causes the problem: node_modules/@nativescript/core/file-system/file-system-access.android.js

Reproduction
No response
Relevant log output (if applicable)
No response
Environment
No response
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project’s Code of Conduct
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21 (11 by maintainers)
Thanks for the support, already targeting the new google play store requirement for our next release seems like a good idea.
@NathanWalker, yes I’m using angular.