SimpleStorage icon indicating copy to clipboard operation
SimpleStorage copied to clipboard

Cannot copy/move hidden folders

Open sanjaykumarm opened this issue 3 years ago • 10 comments

Library version: 0.x.x OS version: [Android 12] Device model: [Samsung S20]

When copying or moving hidden files, it throws security exception.

java.lang.SecurityException: com.android.externalstorage has no access to content://media/external _primary/file/1000008384 at android.os.Parcel.createException or Null(Parcel.java:2438) at 08 android.os.Parcel.createException(P arcel.java:2422) at android.os.Parcel.readException(Par cel.java:2405) at android.database.DatabaseUtils.rea dExceptionFromParcel(DatabaseUtil s.java:190) at android.database.DatabaseUtils.rea dException WithFileNotFoundExcepti on From Parcel(DatabaseUtils.java:15 3)

sanjaykumarm avatar Dec 13 '22 08:12 sanjaykumarm

Can you share the code snippet that causes this error?

anggrayudi avatar Dec 13 '22 08:12 anggrayudi

Used this repo only to copy/move the file from one folder (WhatsApp Statuses) to another folder (Download -> NewFolder or any Folder)

sanjaykumarm avatar Dec 13 '22 08:12 sanjaykumarm

Can you share the video record? It's not happening to me.

anggrayudi avatar Dec 22 '22 15:12 anggrayudi

As you can see here, only folder copied/created but not the files within it. This is happening for some of the Samsung phones only. In Realme, Pixel phones etc working fine.

https://user-images.githubusercontent.com/11767191/209271744-fd80606c-2cea-436e-aae3-4e547e906111.mp4

sanjaykumarm avatar Dec 23 '22 04:12 sanjaykumarm

No longer appears in v1.5.4:

https://user-images.githubusercontent.com/12292380/211263850-42896b70-446b-47dc-8c3d-4a9fd587c218.mp4

The folder is copied successfully:

Screenshot 2023-01-09 at 15 04 46

anggrayudi avatar Jan 09 '23 09:01 anggrayudi

Hello bro, thank you so much for update.

So were you able to reproduce the same issue what I told ? Did you fix it/I mean change the code related to this ? Because I can't see this in release version history note.

sanjaykumarm avatar Jan 12 '23 10:01 sanjaykumarm

I don't know which part that fixes the code. But after testing the same scenario like you've provided in the video, the issue disappears with v1.5.4. That's why I didn't mention this issue in release notes. But you can try with v1.5.4 again, and if the issue persists, then I'll reopen it.

anggrayudi avatar Jan 12 '23 13:01 anggrayudi

Okay I tested it again but same. Nothing changed.

sanjaykumarm avatar Jan 12 '23 15:01 sanjaykumarm

Well, I really can't figure out the root cause. I've tested it with multiple devices using Android 12, but here you have an intermittent issue. I'll reopen it. Let's see if there's someone facing this issue too, maybe she/he can give us a hint.

anggrayudi avatar Jan 12 '23 19:01 anggrayudi

This is very likely this: https://issuetracker.google.com/issues/258270138

PaulWoitaschek avatar May 31 '23 20:05 PaulWoitaschek