question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Picasso does not load the image nor does it log

See original GitHub issue

I am supplying picasso through Koin (DI).

This is my Picasso configuration

fun getPicasso(context: Context, downloader: OkHttp3Downloader): Picasso {
    return Picasso.Builder(context)
            .downloader(downloader)
            .indicatorsEnabled(true)
            .loggingEnabled(true)
            .build()

}

This is theOkHttp3 and OkHttp3Downloader

fun getPicassoDownloader(okHttpClient: OkHttpClient): OkHttp3Downloader {
    return OkHttp3Downloader(okHttpClient)
}
fun getOkHttpInstance(headerInterceptor: HeaderInterceptor, loggingInterceptor: HttpLoggingInterceptor, cache: Cache): OkHttpClient {
    return OkHttpClient.Builder()
            .addInterceptor(headerInterceptor)
            .addInterceptor(loggingInterceptor)
            .cache(cache)
            .build()
}

This OkHttp3 is a singleton used across every entity that requires it such as Retrofit, Picasso.

I then load the image like this in a recycler view

picasso.load(image.urls?.regular)
                    .fit()
                    .centerCrop()
                    .into(itemView.item_image)

I have logged the URL’s and verified that the URL’s are working But I see no image in the imageView nor do I see any logs as I’ve set logging interceptor to be true.

I also tried commenting out the OkHttpDownloader instance in picasso so that I use the default configuration. But that doesn’t work either.

Picasso Version : 2.71828 OkHttp3Downloader Version: 1.1.0 OkHttp3 Version : 3.10.0

Android Device : One Plus 6 Android Version : 8.1.0 Android OS : Oxygen OS 5.1.8

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:21 (3 by maintainers)

github_iconTop GitHub Comments

15reactions
Kolyallcommented, Nov 9, 2018

Here is working project with the issue. https://github.com/Kolyall/Picasso271828 To fix it use com.squareup.picasso.OkHttp3Downloader instead of com.jakewharton.picasso.OkHttp3Downloader

8reactions
babul01procommented, Oct 30, 2018

Be oversure image URL path with https protocol, hopefully, it will be work!!!

Example:

https😕/bangladhol.com/book_th/C29B5E81.jpg

instead of

http😕/bangladhol.com/book_th/C29B5E81.jpg

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Picasso Image does not load - Stack Overflow
NOTE: In my case I was capturing image from device's camera then uploading it to firestore and then loading image using picasso. So...
Read more >
How to Use Picasso Image Loader Library in Android?
If an image or set of images aren't loading, make sure to check the Android monitor log in Android Studio. There's a good...
Read more >
Displaying Images with the Picasso Library
Displaying images is easiest using a third party library such as Picasso from Square which will download and cache remote images and abstract...
Read more >
Using Picasso in Android | Engineering Education (EngEd ...
Picasso is a powerful image loading, downloading, and caching library ... Picasso does not support GIF animation on a simple image view.
Read more >
Picasso Tutorial for Android: Getting Started
Passing a null reference as a parameter will not trigger any request but will display a placeholder image if you have specified one....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found