HBiSoft / PickiT

An Android library that returns real paths from Uri's

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash SecurityException Permission Denial

huutho-dev opened this issue · comments

Caused by java.lang.SecurityException
Permission Denial: opening provider com.google.android.libraries.storage.storagelib.FileProvider from ProcessRecord{4362fa7d0 18613:package.name/u0a1183} (pid=18613, uid=11183) that is not exported from UID 10198

This bug occused when open file from file manager.
I think it happen with devices have removable-storage (sdcard)

  • Device: Galaxy S8
  • Android: 9
    Please check it, thank you <3

I don't think this is related to the library. Did you add FLAG_GRANT_READ_URI_PERMISSION to your intent?

image

Because intent start from FileManager, so I don't know add FLAG_GRANT_READ_URI_PERMISSION to where.

I has add flag FLAG_GRANT_READ_URI_PERMISSION like below image, but nothing change

image

What does the Uri return - intent.data?

Caused by java.lang.SecurityException
Permission Denial: reading com.whatsapp.contentprovider.MediaProvider uri content://com.whatsapp.provider.media/item/61e3361d-9265-4816-a2af-2b07c727dcd7 from pid=27662, uid=10110 requires the provider be exported, or grantUriPermission()

Caused by java.lang.SecurityException
Permission Denial: opening provider com.google.android.libraries.storage.storagelib.FileProvider from ProcessRecord

Caused by java.lang.SecurityException
Permission Denial: opening provider com.whatsapp.contentprovider.MediaProvider

Caused by java.lang.SecurityException
Permission Denial: opening provider com.google.android.apps.docs.storagebackend.StorageBackendContentProvider from ProcessRecord

Caused by java.lang.SecurityException
Permission Denial: opening provider androidx.core.content.FileProvider from ProcessRecord

Some crash i copy from firebase crashlytics

Exactly what I thought. This library is for returning file paths from MediaStore, as shown in the demo application.


You are selecting a file with, what I assume is an app called File Manager. It then returns the Uri, you pass it to PickiT and then it crashes.

It's impossible to know what content://com.whatsapp.provider.media/item/61e3361d-9265-4816-a2af-2b07c727dcd7 is pointing to.

When you want to do what you are currently doing, you will have to use the Uri or copy the file to your applications folder and use that path.


I will be closing this issue because it is out of scope of what this library is intended for.

Yes, Thanks for supported.