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
bug: Filesystem.stat() crashes app with content urls #308
Comments
can you provide a sample app? |
@jcesarmobile I made further tests. Crash only occurs with paths starting Here is a sample app : |
Yeah, content urls are only supported by readFile at the moment because they are not regular filesystem url, they belong to other app and you can't do Filesystem tasks on another app file, other than reading it if it was shared, and maybe stat could be implemented with a lot of content resolver code. |
I have created a plugin to read a file's name and size from a content uri : https://github.com/ThomasKientz/capacitor-plugin-file-infos Would be nice to implement it inside FS plugin imo ! |
Same issue with the |
This issue is about content urls, that's an android thing, so can't work on iOS. |
What I mean is, that |
I think important information like that, should be displayed way more prominent in the docs. The current hint is not sufficiently clear at all.
|
I found a solution / workaround. I'm now converting |
Bug Report
Capacitor Version
npx cap doctor
output:Affected Platform(s)
Description
No issues with
Filesystem.readFile
With
Filesystem.stat
the app crashed and I got the following error in the Android Studio consoleThe text was updated successfully, but these errors were encountered: