bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.67k stars 6.12k forks source link

Glide not loading real image and stuck with placeholder #2469

Closed MinkiPan-zz closed 7 years ago

MinkiPan-zz commented 7 years ago

Glide Version 4.2.0 No extern glide integration

https://stackoverflow.com/questions/36384789/glide-not-loading-real-image-and-stuck-with-placeholder

I have workaround this bug once, but since update, it happens again It doesn't happen on Android OS 7.x but on: Tab 3 (Android 4.4.2) S3 Mini (Android 4.2.2) Xperia Z (Android 4.3) Nexus 10 (Android 5.1.1)

val request = GlideApp.with(imageView) request.load(pictureUrl) .placeholder(R.drawable.gfx_profile_avatar) .error(R.drawable.gfx_profile_avatar) .diskCacheStrategy(DiskCacheStrategy.NONE) .dontAnimate() .into(imageView)

How can I workaround this now? Or what else can I do?

sjudd commented 7 years ago

See http://bumptech.github.io/glide/doc/debugging.html to try to figure out why the image never shows up.

MinkiPan-zz commented 7 years ago

W/Glide: Load failed for https:/cache.willhaben.at/mmo/userProfile/22048176_8c27c9a0e482bbd9dafc12fc0a3b9074.jpg with size [150x150] class com.bumptech.glide.load.engine.GlideException: Failed to load resource Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed

                                                             Cause (1 of 1): class java.net.UnknownHostException: https:/cache.willhaben.at/mmo/userProfile/22048176_8c27c9a0e482bbd9dafc12fc0a3b9074.jpg

I don't get it, the url definitely work, and I have internet If I restart the app, it works but why?? I don't see any pattern here, and I don't know how to resolve this one

MinkiPan-zz commented 7 years ago

okay I foun the issue, we can close this now

https:/cache.willhaben.at/mmo/userProfile/22048176_8c27c9a0e482bbd9dafc12fc0a3b9074.jpg there was a slash missing after https: -.-

I think on modern android OS they use okhttp internally and it auto correct the url, where old devices doesnt

TWiStErRob commented 7 years ago

Wow, good learning, thank you for sharing!