-
Notifications
You must be signed in to change notification settings - Fork 604
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
await Filesystem.requestPermissions() hangs forever #1839
Comments
This issue needs more information before it can be addressed. Please see the Contributing Guide for how to create a Sample App. Thanks! |
Here is a repo that reproduces the issue. |
This issue has been labeled as |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out. |
Bug Report
Plugin(s)
capacitor/filesystem
Capacitor Version
Platform(s)
Android
Current Behavior
If you await the result, or .then() the result, it never resolves when the user click allow.
Expected Behavior
The promise should resolve
Code Reproduction
https://github.com/TDola/capacitor-file-system-request-error/tree/master
Other Technical Details
Running inside android API 26 emulator
Additional Context
It does console log this, and it does grant the permission. So if you force quit and reload, it does resolve the promise the second time
I don't really know Java, but I am trying to trace this, and I notice in this function
node_modules/@capacitor/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java
call.resolve() is never called. I don't know how getMethodName works but there isn't a case for requestPermission or a default
So I added this to the end
And it seems to have made it happy
The text was updated successfully, but these errors were encountered: