java.lang.RuntimeException: An error occured while executing doInBackground()

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 galaxyfeeder
, 2 years ago
An error occured while executing doInBackground()
via GitHub by noamamiran
, 11 months ago
An error occured while executing doInBackground()
via GitHub by RoelRoel
, 2 years ago
An error occured while executing doInBackground()
via GitHub by LiquidSnack
, 2 years ago
An error occured while executing doInBackground()
via GitHub by nirabpudasaini
, 2 years ago
An error occured while executing doInBackground()
via GitHub by blueleader07
, 2 years ago
An error occured while executing doInBackground()
java.lang.SecurityException: Permission Denial: opening provider com.android.gallery3d.provider.GalleryProvider from ProcessRecord{43bf86e8 21926:com.example.picasatest/u0a156} (pid=21926, uid=10156) requires com.google.android.gallery3d.permission.GALLERY_PROVIDER or com.google.android.gallery3d.permission.GALLERY_PROVIDER
at android.os.Parcel.readException(Parcel.java:1465)
at android.os.Parcel.readException(Parcel.java:1419)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:2848)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4399)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2200)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1425)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1047)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:904)
at com.example.picasatest.android.lib.util.ImageUtil.resizeToFileFromOtherProvider(ImageUtil.java:129)
at com.example.picasatest.android.lib.util.ImageUtil.resizeToFile(ImageUtil.java:57)
at com.example.picasatest.util.ImageResizeTask.doInBackground(ImageResizeTask.java:53)
at com.example.picasatest.util.ImageResizeTask.doInBackground(ImageResizeTask.java:14)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

Users with the same issue

Once, 4 hours ago
7 times, 13 hours ago
5 times, 1 day ago
Once, 2 days ago
2 times, 2 weeks ago

Write tip

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