yellowbluesky / PixivforMuzei3

Best Pixiv plugin for Muzei 3
GNU General Public License v3.0
173 stars 15 forks source link

It doesn't retry failed build #199

Closed linsui closed 6 months ago

linsui commented 8 months ago

In previous versions it retry the downloading when the downloaded file is broken. But in the latest version it doesn't retry anymore and show the broken images directly.

yellowbluesky commented 7 months ago

I've figured out a better and more efficient way to check for incomplete or corrupt images.

The old way was very inefficent and often did not work.

I will try to add this feature in the near future, but it will be slow

yellowbluesky commented 6 months ago

Can you please try this build and see if it fixes your issue of broken images?

https://github.com/yellowbluesky/PixivforMuzei3/releases/tag/3.1.7-alpha

Note that this will create a second Muzei source called "Pixiv for Muzei 3 Dev" and you must switch to it to test the improvements.

linsui commented 6 months ago

It doesn't download a broken image anymore! But I can't clear the cache...

linsui commented 6 months ago

I find that if I enable saving to storage it stops working.

yellowbluesky commented 6 months ago

It doesn't download a broken image anymore! But I can't clear the cache...

I find that if I enable saving to storage it stops working.

This is a little odd to be honest, I do not believe I changed anything to do with file handling or the image cache clear button since my last release.

I can still clear cache when images are saved to internal storage (option is not selected).

Before installing the fix today, what percentage of images were corrupted?

yellowbluesky commented 6 months ago

Since you have the fix installed for a little while now, can you please try setting saving back to internal storage (option not selected) and then let me know if clearing image cache works?

linsui commented 6 months ago

As long as the option is not selected, everything works well. But if I enable the option, I can't clear cache and it doesn't download new images either. I can see that it connects to pixiv and downloads something but the new image doesn't appear.

Before installing the fix today, what percentage of images were corrupted?

About 20%? It depends on the network. Sometimes all new images are broken.

yellowbluesky commented 6 months ago

Can you tell what Android version and Android skin your phone is?

Also, can you please get a logcat of your issue with the clear cache button?

linsui commented 6 months ago

It's Android 13 Lineage OS. 31_01-03-41-26_085.log

yellowbluesky commented 6 months ago

Thanks for providing the log.. The issue looks something to do with network certificates and not with storage, which is confusing. I suspect the issue might have to do with the updated okhttp library version.

I cannot replicate the issue on my systems so I need more information.

  1. Can you confirm if an authorised feed mode on the dev version (like Follow Feed) also has the same issue?

  2. When you run the production version of my app from an app store (FDroid?), does it work using the same settings that cause the issue in the dev version?

linsui commented 6 months ago

The issue looks something to do with network certificates and not with storage, which is confusing.

That's not related. I can reproduce the problem with a proxy. 31_01-15-44-34_513.log It seems that the clear cache operation relies on downloading new images and if I save the images to storage the download fails.

Can you confirm if an authorised feed mode on the dev version (like Follow Feed) also has the same issue?

I don't have an account to test.

When you run the production version of my app from an app store (FDroid?), does it work using the same settings that cause the issue in the dev version?

3.7 hasn't been available in F-Droid. 3.6 works well.

yellowbluesky commented 6 months ago

Can you please try this build and let me know if you have any issues with it.

https://github.com/yellowbluesky/PixivforMuzei3/releases/tag/3.1.7-alpha2

After uninstalling and reinstalling my app, I was able to replicate your issue of nto being able to save into external storage. Turns out the issue was a very simple one and entirely my fault.

linsui commented 6 months ago

It works now, thanks!

yellowbluesky commented 6 months ago

No worries, I'm happy to help my users :)

I'll close this issue now. When the fix gets merged into the production version on Google Play or Fdroid I will let you know here