Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glide returns java.io.FileNotFoundException to URL with a query parameter #4311

Closed
heaven-dev opened this issue Aug 14, 2020 · 1 comment
Closed

Comments

@heaven-dev
Copy link

heaven-dev commented Aug 14, 2020

Glide Version: 4.11.0

Integration libraries: no

Device/Android Version: Android TV emulator API 23

Issue details / Repro steps / Use case background: At first thanks this great library. Im trying to load image (https://helsinki.tv7.fi/exodus-interfaces/image?id=12766) and show it on Android TV UI. Glide gives me FileNotFoundException. Other image (http://goo.gl/gEgYUd) works without problems.

Is this problem related to the query parameter of the URL? I am able to open URL in browser and also URL works in an other javascript app.

Glide load line / GlideModule (if any) / list Adapter code (if any):

import android.widget.ImageView;
import com.bumptech.glide.Glide;

// example code which gives FileNotFoundException:
ImageView imageView = root.findViewById(R.id.myImage);
Glide.with(this).asBitmap().load("http://helsinki.tv7.fi/exodus-interfaces/image?id=12766").into(imageView);


// example code which works ok:
ImageView imageView = root.findViewById(R.id.myImage);
Glide.with(this).asBitmap().load("http://goo.gl/gEgYUd").into(imageView);

Layout XML:

<ImageView
        android:id="@+id/myImage"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="8dp"
        android:paddingStart="15dp"
        android:paddingEnd="15dp"
        android:background="@drawable/content_item"/>

Stack trace / LogCat:

08-14 09:54:33.463 7638-7638/org.tv7 I/Glide: Root cause (1 of 1)
java.io.FileNotFoundException: http://helsinki.tv7.fi/exodus-interfaces/image?id=12766
     at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
     at com.bumptech.glide.load.data.HttpUrlFetcher.loadDataWithRedirects(HttpUrlFetcher.java:102)
     at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:56)
     at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
     at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.startNextOrFail(MultiModelLoader.java:164)
     at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onLoadFailed(MultiModelLoader.java:154)
     at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:62)
     at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
     at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:70)
     at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:63)
     at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:310)
     at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:279)
     at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:234)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
     at java.lang.Thread.run(Thread.java:818)
     at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:393)
@heaven-dev heaven-dev changed the title Clide returns java.io.FileNotFoundException to URL with a query parameter Glide returns java.io.FileNotFoundException to URL with a query parameter Aug 14, 2020
@heaven-dev
Copy link
Author

heaven-dev commented Aug 14, 2020

I solved this issue by changing URL scheme from http to https.

It wasn't a Glide problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant