java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/102 from pid=18439, uid=10281 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

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()

,
Expert tip

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

Solutions on the web

via GitHub by jkwiecien
, 1 year ago
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/102 from pid=18439, uid=10281 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
via Stack Overflow by Valeriy Katkov
, 6 months ago
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/8516 from pid=21859, uid=10356 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
via Stack Overflow by user3768146
, 2 years ago
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/67 from pid=15504, uid=10252 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
via GitHub by pbeckmann
, 1 year ago
Permission Denial: reading com.fsck.k9.provider.AttachmentProvider uri content://com.fsck.k9.attachmentprovider/5dbd3d2e-403b-47af-a3bd-ae6214ceb795/829/VIEW from pid=11042, uid=10070 requires com.fsck.k9.permission.READ_ATTACHMENT, or grantUriPermission()
via GitHub by misaochan
, 1 year ago
Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image%3A55 from pid=2725, uid=10058 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
via GitHub by daniele-athome
, 7 months ago
Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image%3A554 from pid=5788, uid=10183 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/102 from pid=18439, uid=10281 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1540)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:148)
at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:689)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1088)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:927)
at pl.aprilapps.easyphotopicker.EasyImage.pickedPicture(EasyImage.java:197)
at pl.aprilapps.easyphotopicker.EasyImage.onPictureReturnedFromGallery(EasyImage.java:297)
at pl.aprilapps.easyphotopicker.EasyImage.handleActivityResult(EasyImage.java:244)
at pl.aprilapps.easyphotopicker.sample.MainActivity.onActivityResult(MainActivity.java:103)
at android.app.Activity.dispatchActivityResult(Activity.java:6475)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3970)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4017)
at android.app.ActivityThread.access$1400(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1471)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5832)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
157 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 3 hours ago
250 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.