-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Picasso does not load the image nor does it log #1931
Comments
I suspect the URL is null. Otherwise there would be logs.
…On Sun, Jun 24, 2018, 10:33 AM Sriram R ***@***.***> wrote:
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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1931>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEbBJBQdjOIomgCmLWSRAGcMgZMh0ks5t_6MsgaJpZM4U1LID>
.
|
No. I verified by logging the URL's separately in onBindViewHolder. I also opened them. They work perfectly. |
There's not enough information to diagnose a problem here then. The sample
app works. Can you provide a sample which doesn't so we can debug?
…On Sun, Jun 24, 2018, 10:42 AM Sriram R ***@***.***> wrote:
No. I verified by logging the URL's separately in onBindViewHolder. I also
opened them. They work perfectly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1931 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEaoHTveJ-eMDycCsS8_WY7PSan-Qks5t_6U8gaJpZM4U1LID>
.
|
I just commented out the dependency, removed the comments and ran the build. Everything works fine now. I don't know why it didnt work for the past hour. Thanks for the immediate reply anyway. |
I have similar problem Here is the log:
without
|
Yeah but I didn't use with () anywhere. I supplied the Picasso instance as above using DI. All I did was clean and re build the project and it started working |
I can confirm that this issue is still present after updating to Picasso 2.7. I have narrowed it down to this: This does NOT work
This works ( Notice missing OkHttp3Downloader ):
I am not sure how to debug this but what appears to be happening is that something is going on with OkHttp3Downloader and PIcasso 2.7 |
Did you find a solution to this? I have also just done an update to 2.7 and I am no longer getting images downloading. I see nothing being reported in the console either... |
@FantasyLand17 gave me a hint
|
I confirm that no image is shown when we use OkHttp3Downloader with Picasso 2.7 |
EDIT: it looks like there is a reason for that #31 @JakeWharton maybe this issue could be closed? OLD:
but it works as expected if the downloader is removed. |
uh, i am curious about why a custom downloader wasn't working in Picasso e, in case you find out. Jake's library should have just worked the same as the builtin downloader in Picasso e. |
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 |
Following up: for me the issue was setting a cache on the OkHttpClient. This appeared to be caching 404 results, so if I failed to get an image for some reason, I was never able to download the image. In my case this was actually happening very often as we were requesting URLs before they were fully ready. Removing the caching on OkHttpClient fixed my issue, and since Picasso is already caching for us, we didn't really need it on the http client anyways (that I am aware of). |
Here is working project with the issue. |
Can confirm, replacing Jake's Downloader with Squareup OkHttp3Downloader fixed this issue. |
so anyone found any solution?? i'm currently using 2.5.2 |
@chhattsolutions did you try using |
I was facing the same error, I resized the same image and uploaded to the firebase then load its url using picasso and this time it worked totally file images was loaded successfully. |
I met the "same" problem and finally found out the reason: my system time was incorrect, accidentally set system time to future. That's not Picasso's problem. :P |
I also have the same problem when I changed with() to get() and as @ATOM49 says I remove the two lines from my API call all working good now thanks for the tip Removed Lines: |
I am supplying picasso through Koin (DI).
This is my Picasso configuration
This is theOkHttp3 and OkHttp3Downloader
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
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
The text was updated successfully, but these errors were encountered: