bumptech / bumptech/glide

Load failed for https://image.tmdb.org/t/p/w500null

Open
#4,578 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

I have a sample app which you can find source code here : https://github.com/Ali-Rezaei/TMDb-Paging

You can find the app here as well : https://play.google.com/store/apps/details?id=com.sample.android.tmdb

When I move from main screen includes a RecyclerView with images to the detail screen and rotate the device to landscape, and then move back to main screen, I face with a black screen and receive following errors in Logcat :

`2021-06-09 23:00:05.524 4198-4198/com.sample.android.tmdb W/Glide: Load failed for https://image.tmdb.org/t/p/w500null with size [242x359]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
java.io.FileNotFoundException(https://image.tmdb.org/t/p/w500null)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE
There was 1 cause:
java.io.FileNotFoundException(https://image.tmdb.org/t/p/w500null)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed
There was 1 cause:
java.io.FileNotFoundException(https://image.tmdb.org/t/p/w500null)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.io.FileNotFoundException: https://image.tmdb.org/t/p/w500null
2021-06-09 23:00:05.526 4198-4198/com.sample.android.tmdb I/Glide: Root cause (1 of 1)
java.io.FileNotFoundException: https://image.tmdb.org/t/p/w500null
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:255)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:211)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:30)
at com.bumptech.glide.load.data.HttpUrlFetcher.loadDataWithRedirects(HttpUrlFetcher.java:106)
at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:59)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:99)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.startNextOrFail(MultiModelLoader.java:150)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onLoadFailed(MultiModelLoader.java:144)
at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:65)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:99)
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:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)`

If I click on home button and resume the app, I see the main screen again successfully. I have tried latest version of Glide and my device version is Android 11.

I have tested on Android 9 and there is no issue there.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the linked sample app on Android 11: open the image list, enter a detail screen, rotate to landscape, and return. Inspect how the image URL is constructed and restored after rotation, then verify that returning to the main screen no longer requests a URL ending in null and that images load successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.