Skip to content

[Bug] IllegalArgumentException in MediaProvider when copying images inside hidden folders #1003

@sakarie9

Description

@sakarie9

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected app version

1.13.1

Affected Android/Custom ROM version

YAAP Android 16 with March security patch

Affected device model

OnePlus 7

How did you install the app?

GitHub releases

Steps to reproduce the bug

  1. Navigate to a hidden folder (ensure "Show hidden items" is enabled).

  2. Open any image inside this hidden folder.

  3. Select the "Copy" action to copy the image to another location.

  4. Copy will not proceed and a toast with error will show.

Expected behavior

The image should be copied successfully. If the file is hidden and not indexed by MediaStore, the app should ideally fallback to other copy methods instead of relying on the MediaProvider URI.

Also noticed that copy not working, but move to and delete works fine.

Actual behavior

The image will not copy.

Screenshots/Screen recordings

No response

Additional information

2026-03-26 10:30:44.487  4016-9323  DatabaseUtils           com.android.providers.media.module   E  Writing exception to parcel
                                                                                                    java.lang.IllegalArgumentException: Invalid Uri: content://media/external/images/media/1000571982
                                                                                                    	at com.android.providers.media.MediaProvider.createRequest(MediaProvider.java:8792)
                                                                                                    	at com.android.providers.media.MediaProvider.getResultForCreateOperationsRequest(MediaProvider.java:8080)
                                                                                                    	at com.android.providers.media.MediaProvider.callInternal(MediaProvider.java:7340)
                                                                                                    	at com.android.providers.media.MediaProvider.call(MediaProvider.java:7286)
                                                                                                    	at android.content.ContentProvider.call(ContentProvider.java:2746)
                                                                                                    	at android.content.ContentProvider$Transport.call(ContentProvider.java:640)
                                                                                                    	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:307)
                                                                                                    	at android.os.Binder.execTransactInternal(Binder.java:1478)
                                                                                                    	at android.os.Binder.execTransact(Binder.java:1418)
                                                                                                    Caused by: java.io.FileNotFoundException: No item at content://media/external/images/media/1000571982
                                                                                                    	at com.android.providers.media.MediaProvider.queryForSingleItem(MediaProvider.java:10537)
                                                                                                    	at com.android.providers.media.MediaProvider.createRequest(MediaProvider.java:8787)
                                                                                                    	... 8 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not workingneeds triageIssue is not yet ready for PR authors to take up

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions