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

Unable to load images on Android P #6

Closed
paolorotolo opened this issue Dec 25, 2018 · 2 comments
Closed

Unable to load images on Android P #6

paolorotolo opened this issue Dec 25, 2018 · 2 comments

Comments

@paolorotolo
Copy link
Contributor

Images are not displayed in the app.

Log:

2018-12-25 20:27:20.913 29401-29401/com.skydoves.themovies W/Glide: Load failed for http://image.tmdb.org/t/p/w342/gwPSoYUHAKmdyVywgLpKKA4BjRr.jpg with size [720x840]
    class com.bumptech.glide.load.engine.GlideException: Failed to load resource
    There were 2 causes:
    java.io.IOException(Cleartext HTTP traffic to image.tmdb.org not permitted)
    java.io.FileNotFoundException(No content provider: http://image.tmdb.org/t/p/w342/gwPSoYUHAKmdyVywgLpKKA4BjRr.jpg)
     call GlideException#logRootCauses(String) for more detail
      Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE
    There was 1 cause:
    java.io.IOException(Cleartext HTTP traffic to image.tmdb.org not permitted)
     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.IOException(Cleartext HTTP traffic to image.tmdb.org not permitted)
     call GlideException#logRootCauses(String) for more detail
          Cause (1 of 1): class java.io.IOException: Cleartext HTTP traffic to image.tmdb.org not permitted
      Cause (2 of 2): 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: http://image.tmdb.org/t/p/w342/gwPSoYUHAKmdyVywgLpKKA4BjRr.jpg)
     call GlideException#logRootCauses(String) for more detail
        Cause (1 of 1): class java.io.FileNotFoundException: No content provider: http://image.tmdb.org/t/p/w342/gwPSoYUHAKmdyVywgLpKKA4BjRr.jpg
@paolorotolo paolorotolo changed the title Unable to load images Unable to load images on Android P Dec 25, 2018
@paolorotolo
Copy link
Contributor Author

May be related to recent changes in API level 28: https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted

@paolorotolo
Copy link
Contributor Author

paolorotolo commented Dec 25, 2018

An easy solution would be adding

android:usesCleartextTraffic="true"

in Android Manifest to continue allowing unencrypted HTTP traffic, but I think we may want to switch to HTTPS API instead.

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