-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Checklist
- I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
- This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
This line runs fine on my Android device right after selecting a folder with dialog.ShowFolderOpen:
filelist, err := storage.List(uri)But when I store the folder URI (in the app preferences) and try opening the folder again after an app restart, it crashes because of a missing permission:
02-18 15:39:20.403 1702 1987 W ContentProviderHelper: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{213a2b6 5506:com.goodtemperapps.markdownviewer/u0a639} (pid=5506, uid=10639) requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
02-18 15:39:20.415 5506 17072 F .markdownviewer: java_vm_ext.cc:616] JNI DETECTED ERROR IN APPLICATION: JNI GetObjectClass called with pending exception java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{213a2b6 5506:com.goodtemperapps.markdownviewer/u0a639} (pid=5506, uid=10639) requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
I expect that the function returns err != nil in such a case.
How to reproduce
- Pick folder with
dialog.ShowFolderOpen. - Read content with
storage.List(uri). - Store
uriin preferences. - Restart app.
- Load preferences.
- Call
storage.List(uri).
Screenshots
No response
Example code
I'll try to add a minimal app to reproduce this crash.
Fyne version
develop branch
Go compiler version
go1.25.7
Operating system and version
Arch Linux
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working