ToGoZip icon indicating copy to clipboard operation
ToGoZip copied to clipboard

"No Permissions to write to /storage/emulated/0/Download/copy/2go.zip" even though I gave permission

Open nicolas-raoul opened this issue 5 years ago • 11 comments

Other settings are all default settings.

Maybe I have to create the copy folder by myself? If so, the error message should be clearer.

Thanks! :-)

nicolas-raoul avatar Aug 13 '19 10:08 nicolas-raoul

at startup the app check if it has permissions to write to the predefined output folder and if not it opens the folder chooser.

At least this is working on my android-7.1 devices.

I have just added a check that the proposed folder exists hoping that this will fix the issue

k3b avatar Aug 13 '19 16:08 k3b

@nicolas-raoul does the problem still existist in the current version or can i close this ticket

k3b avatar Jan 14 '20 13:01 k3b

Android 12, Pixel 4a: yes, I observe something like this behavior.

I granted SAF access to /Documents and this works for a 'session'. But once the app has been inactive for some length of time it seemingly forgets the system granted access to /Documents and so the next time I share something to the app it gives a no permission error and pulls up the directory picker.

Conveniently the directory picker starts up at the last chosen folder and I can grant access again to get it working. But as before the app thinks it hasn't got access after a period of inactivity.

locuturus avatar Oct 27 '21 16:10 locuturus

@locuturus thanks for reporting.

if i understood https://developer.android.google.cn/topic/performance/app-hibernation correctly android-11 and later has a feature "Auto-reset permissions from unused apps" that may be the cause of this issue.

k3b avatar Oct 29 '21 14:10 k3b

@locuturus thanks for reporting.

if i understood https://developer.android.google.cn/topic/performance/app-hibernation correctly android-11 and later has a feature "Auto-reset permissions from unused apps" that may be the cause of this issue.

That is a feature, but it takes days or weeks to initiate, not like an hour or two. And in app info I can not see the previously granted SAF access which implies to me that the app is discarding the SAF granted access somehow.

Here is Material Files, from GitHub, showing SAF granted access to different content providers: Screenshot_20211029-090933 vs your app which I've not interacted with for about 2 days: Screenshot_20211029-091742 Which has had it's access cleared somehow. I'm fact, even immediately after granting access again this is not reflected in the app info section. Is your app actually using SAF? There should be a single item listed next to External Storage. Material Files has 5 in my case to compare with that.

locuturus avatar Oct 29 '21 16:10 locuturus

the app is using SAF (if you have android-5.0 and above) and it works without issues on my android-10 .

I have to further anayse and compare to material-files .....

k3b avatar Nov 01 '21 16:11 k3b

I wonder if this stack overflow might be relevant

locuturus avatar Nov 01 '21 17:11 locuturus

@locuturus thanks for the stack-overflow.

I have added the missing flags from https://stackoverflow.com/questions/32563428/storage-access-framework-persist-permissions-not-working

In the zip is the pre-release of the apk with the fix. https://github.com/k3b/ToGoZip/files/7462555/togozip-debug.zip

can you test if this fixes the problem?

I only have an android-10 device and the android-emulator does not work on my computer.

k3b avatar Nov 02 '21 17:11 k3b

DISPLAY_NAME column is null error in is preventing me from installing.

locuturus avatar Nov 03 '21 01:11 locuturus

@locuturus : sorry something with the debug build went wrong.

this one should be working (at least i can install it on my android-10.

togozip-debug2.zip

k3b avatar Nov 03 '21 16:11 k3b

This issue still exists with the latest version on Fairphone 3, /e/OS (based on LineageOS for microG, Android 10)

bege10 avatar Jul 03 '22 19:07 bege10