Glide trying to load from assets directory instead of internet
Integration libraries: using Glide version: 4.6.1 using com.github.bumptech.glide:okhttp3-integration:4.6.1
Device/Android Version: Samsung S6 Android version 24
Issue details / Repro steps / Use case background: I am trying to load an image from Internet into ImageView but it seems like Glide is trying to load from assets directory instead of Internet.
//this is the ApplicationContext
RequestManager requestManager = Glide.with(this)
.applyDefaultRequestOptions(RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.NONE))
.applyDefaultRequestOptions(RequestOptions.placeholderOf(R.drawable.placeholder));
requestManager
.applyDefaultRequestOptions(RequestOptions.skipMemoryCacheOf(true));
}
requestManager.load("http://opendata.toronto.ca/transportation/tmc/rescucameraimages/CameraImages/loc8015.jpg")
.into(image);
Layout XML:
<ImageView
android:id="@+id/cam_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_gravity="center"
android:gravity="center"
android:scaleType="fitCenter"
/>
Stack trace / LogCat:
Root cause (1 of 1)
java.io.FileNotFoundException: No content provider: http://opendata.toronto.ca/transportation/tmc/rescucameraimages/CameraImages/loc8015.jpg
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1049)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:904)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:831)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:22)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:13)
at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:266)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
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)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
turns out that the url has a trailing space. I am able to workaround the issue by trimming the space in the url before passing it into .load(String)
That said, perhaps Glide should handle this in a more robust manner.
This is the error I get, with or without the trailing space:
java.lang.RuntimeException: com.bumptech.glide.load.engine.GlideException: Failed to load resource
There were 2 causes:
java.net.UnknownHostException(Unable to resolve host "opendata.toronto.ca": No address associated with hostname)
java.io.FileNotFoundException(No content provider: http://opendata.toronto.ca/transportation/tmc/rescucameraimages/CameraImages/loc8015.jpg)
call GlideException#logRootCauses(String) for more detail
at com.bumptech.glide.test.ConcurrencyHelper$1.await(ConcurrencyHelper.java:46)
at com.bumptech.glide.test.ConcurrencyHelper.wait(ConcurrencyHelper.java:300)
at com.bumptech.glide.test.ConcurrencyHelper.get(ConcurrencyHelper.java:39)
at com.bumptech.glide.LoadUrlTest.loadsUrlWithAppendedString(LoadUrlTest.java:24)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at com.bumptech.glide.test.TearDownGlide$1.evaluate(TearDownGlide.java:21)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:346)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:311)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:76)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:309)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:63)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:289)
at org.junit.runners.ParentRunner.run(ParentRunner.java:393)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:311)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:76)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:309)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:63)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:289)
at org.junit.runners.ParentRunner.run(ParentRunner.java:393)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2074)
Caused by: com.bumptech.glide.load.engine.GlideException: Failed to load resource
There were 2 causes:
java.net.UnknownHostException(Unable to resolve host "opendata.toronto.ca": No address associated with hostname)
java.io.FileNotFoundException(No content provider: http://opendata.toronto.ca/transportation/tmc/rescucameraimages/CameraImages/loc8015.jpg)
call GlideException#logRootCauses(String) for more detail
Are you able to reproduce the issue if you add trailing space to url that works for you?
I'm not able to reproduce the issue with the given url, even if I add a trailing space. I do see another network error though.
@sjudd I'm not 100% sure but I got the same issue and I think I know how to reproduced it.
I was today on the starbucks open wifi network and every 30 minutes I'll get the login screen for the wifi network. Since both this issue image url and mine was an http url seems like somehow glide cached the wifi sign in redirect response and treated it as an image?
#2801 probably related
Hope it helps!
@nabrozidhs by the same issue do you mean you get the same error as originally posted here?
It's definitely possible for Glide to end up downloading and trying to decode a web page, but, assuming you're using the default disk cache strategy, this is not the error I'd expect.
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
I am experiencing the exact issue that @weejim76 posted.
GlideApp.with(applicationContext)
.load("http://vehicleimg.gasbuddy.io/photos/vehicles/ad84d02d-058e-4864-94fe-a84379f4e8c2.jpg")
.skipMemoryCache(true)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.into(vehiclePhoto)
With a very similar stacktrace:
java.io.FileNotFoundException: No content provider: http://vehicleimg.gasbuddy.io/photos/vehicles/ad84d02d-058e-4864-94fe-a84379f4e8c2.jpg
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1049)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:904)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:831)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:22)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:13)
at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
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)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
However, I am only experiencing this issue on kitkat devices.
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
I'm having the same issue :
Device: Genymotion Emulator Failing on Android API: 25 Tested and working on Android APIs: 21, 22, 23, 24, 26
Gradle:
/* Glide */
implementation ("com.github.bumptech.glide:glide:4.6.1") {
exclude group: "com.android.support"
}
implementation "com.android.support:support-fragment:27.1.0"
kapt 'com.github.bumptech.glide:compiler:4.6.1'
Adapter:
Glide.with(context)
.load("http://192.168.0.156:56321/api/values")
.into(holder.imgProfile)
Logcat:
/Glide: Load failed for http://192.168.0.156:56321/api/values with size [150x180]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There were 4 causes:
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{DirectByteBuffer->Object->Drawable}, DATA_DISK_CACHE, http://192.168.0.156:56321/api/values
Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->GifDrawable->Drawable}
Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->Bitmap->Drawable}
Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->BitmapDrawable->Drawable}
Cause (2 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream->Object->Drawable}, DATA_DISK_CACHE, http://192.168.0.156:56321/api/values
Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->GifDrawable->Drawable}
Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->Bitmap->Drawable}
Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->BitmapDrawable->Drawable}
Cause (3 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor->Object->Drawable}, DATA_DISK_CACHE, http://192.168.0.156:56321/api/values
There were 2 causes:
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->Bitmap->Drawable}
There was 1 cause:
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->BitmapDrawable->Drawable}
There was 1 cause:
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
Cause (4 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{DirectByteBuffer->Object->Drawable}, REMOTE, http://192.168.0.156:56321/api/values
Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->GifDrawable->Drawable}
Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->Bitmap->Drawable}
Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->BitmapDrawable->Drawable}
Cause (5 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream->Object->Drawable}, REMOTE, http://192.168.0.156:56321/api/values
Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->GifDrawable->Drawable}
Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->Bitmap->Drawable}
03-09 14:02:23.477 2007-2007/br.com.sofis.hemoteid W/Glide: Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->BitmapDrawable->Drawable}
Cause (6 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor->Object->Drawable}, REMOTE, http://192.168.0.156:56321/api/values
There were 2 causes:
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->Bitmap->Drawable}
There was 1 cause:
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->BitmapDrawable->Drawable}
There was 1 cause:
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
03-09 14:02:23.478 2007-2007/br.com.sofis.hemoteid I/Glide: Root cause (1 of 4)
java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:160)
at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:72)
at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:55)
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:45)
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:58)
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:43)
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:498)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:469)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:455)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:407)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76)
at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:415)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76)
at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:415)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95)
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:74)
at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:266)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
Caused by: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
at android.media.MediaMetadataRetriever.setDataSource(Native Method)
at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:136)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder$ParcelFileDescriptorInitializer.initialize(VideoDecoder.java:219)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder$ParcelFileDescriptorInitializer.initialize(VideoDecoder.java:214)
at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:155)
at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:72)
at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:55)
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:45)
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:58)
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:43)
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:498)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:469)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:455)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:407)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76)
at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:415)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95)
at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76)
at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:415)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376)
at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95)
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:74)
at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:266)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
I got this problems as well. Has it been solved now?
I don't see "No content provider:" in the stack trace for @fabio-filho, so that may be a different issue. @miguoer can you attach a stack trace if you're able to reproduce?
Adapter code:
Glide.with(getActivity()).load("https://cdn.hookupdating.mobi/PHEQ5FL0MAFQWR5RT1THEFXHWZY4UXHM.jpg")
.apply(requestOptions.placeholder(R.drawable.placeholder_f))
.into(portrait);
Error trace:
04-03 11:45:04.348 12501-12501/com.hookupdating W/Glide: Load failed for "https://cdn.hookupdating.mobi/PHEQ5FL0MAFQWR5RT1THEFXHWZY4UXHM.jpg" with size [1080x1050]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
java.io.FileNotFoundException(No content provider: "https://cdn.hookupdating.mobi/PHEQ5FL0MAFQWR5RT1THEFXHWZY4UXHM.jpg")
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.content.res.AssetFileDescriptor, LOCAL
There was 1 cause:
java.io.FileNotFoundException(No content provider: "https://cdn.hookupdating.mobi/PHEQ5FL0MAFQWR5RT1THEFXHWZY4UXHM.jpg")
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.io.FileNotFoundException: No content provider: "https://cdn.hookupdating.mobi/PHEQ5FL0MAFQWR5RT1THEFXHWZY4UXHM.jpg"
04-03 11:45:04.349 12501-12501/com.hookupdating I/Glide: Root cause (1 of 1)
java.io.FileNotFoundException: No content provider: "https://cdn.hookupdating.mobi/PHEQ5FL0MAFQWR5RT1THEFXHWZY4UXHM.jpg"
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1435)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1286)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1209)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:22)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:13)
at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
I got same issue with 4.6.1:
GlideApp.with(this.mContext)
.load("https://www.baidu.com/img/superlogo_c4d7df0a003d3db9b65e9ef0fe6da1ec.png")
.centerCrop()
.into(helper.getView(R.id.iv_film_img))
And it pop:
2018-04-10 17:09:14.010 8403-8403/com.sirius.cybird I/Glide: Root cause (1 of 1)
java.io.FileNotFoundException: No content provider: https://www.baidu.com/img/superlogo_c4d7df0a003d3db9b65e9ef0fe6da1ec.png
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1163)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1014)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:937)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:22)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:13)
at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
Is this reliably reproducible for anyone? Or do you just see this occasionally?
@sjudd I try to use 2 real devices(OPPO R11s AndroidVersion 7.1.1 & XiaoMi 5s AndroidVersion 6.0.1) and one virtual device(GoogleNexus7 Android5.0.0) run my app, the two real devices were pop this trace always, and not show the image. And the virtual device work fine.
And I try to use version 3.7.0, it works fine in any devices.
I am also facing the same issue as well in 4.6.1, Is this resolved ?
Glide 4.7.1 - same issue
Root cause (3 of 3)
java.io.FileNotFoundException: No content provider: https://flickr.com/photos/122091795@N06/26676774137
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1146)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:997)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:920)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:22)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:13)```
Same problem
Load failed for https://78.media.tumblr.com/c7a862f10e42e8a7fa3439cf793283f8/tumblr_p2x7exUGsO1rvoqjeo1_1280.png with size [720x893]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
java.io.FileNotFoundException(No content provider: https://78.media.tumblr.com/c7a862f10e42e8a7fa3439cf793283f8/tumblr_p2x7exUGsO1rvoqjeo1_1280.png)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.content.res.AssetFileDescriptor, LOCAL, DataCacheKey{sourceKey=https://78.media.tumblr.com/c7a862f10e42e8a7fa3439cf793283f8/tumblr_p2x7exUGsO1rvoqjeo1_1280.png, signature=EmptySignature}
There was 1 cause:
java.io.FileNotFoundException(No content provider: https://78.media.tumblr.com/c7a862f10e42e8a7fa3439cf793283f8/tumblr_p2x7exUGsO1rvoqjeo1_1280.png)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.io.FileNotFoundException: No content provider: https://78.media.tumblr.com/c7a862f10e42e8a7fa3439cf793283f8/tumblr_p2x7exUGsO1rvoqjeo1_1280.png
04-23 13:31:28.056 12754-12754/? I/Glide: Root cause (1 of 1)
java.io.FileNotFoundException: No content provider: https://78.media.tumblr.com/c7a862f10e42e8a7fa3439cf793283f8/tumblr_p2x7exUGsO1rvoqjeo1_1280.png
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1167)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1000)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:923)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:22)
at com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher.loadResource(AssetFileDescriptorLocalUriFetcher.java:13)
at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:44)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:272)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
I am able to reproduce this error message with https://flickr.com/photos/122091795@N06/26676774137. However that's because it's an HTML page, not an image url. Glide won't be able to successfully load HTML pages, so the best we'd do there is change the error message.
Does anyone here have a url that works on a previous version of Glide or that they otherwise expect to be able to view successfully? Or is it just that this error message is confusing when you provide a non-image url?