java.lang.SecurityException

Permission Denial: reading com.google.android.apps.photos.contentprovider.MediaContentProvider uri content://com.google.android.apps.photos.contentprovider/0/1/content%3A%2F%2Fmedia%2Fexternal%2Fimages%2Fmedia%2F19181/ORIGINAL/NONE/443149508 from pid=18891, uid=10128 requires the provider be exported, or grantUriPermission()

Samebug tips5

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()


rafaelrafael

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> on the Android Manifest


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Stack trace

  • java.lang.SecurityException: Permission Denial: reading com.google.android.apps.photos.contentprovider.MediaContentProvider uri content://com.google.android.apps.photos.contentprovider/0/1/content%3A%2F%2Fmedia%2Fexternal%2Fimages%2Fmedia%2F19181/ORIGINAL/NONE/443149508 from pid=18891, uid=10128 requires the provider be exported, or grantUriPermission() at android.os.Parcel.readException(Parcel.java:1620) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183) at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146) at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:692) at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1104) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:942) at android.content.ContentResolver.openInputStream(ContentResolver.java:662) at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:176) at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:114) at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27) at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:19) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.os.HandlerThread.run(HandlerThread.java:61)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

iridiciridic
157 times, last one
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown UserUnknown User
14 times, last one
232 more bugmates