-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Possible race condition causing random failure of WebP polyfill loaded from the ZIM (SW mode) #673
Comments
I confirm aomething is fishy. A bug has been reported in iOS and I migrated it to MWoffliner because I believe the bug is there.... but I have not really a clue what to do next. See openzim/mwoffliner#1453 |
@kelson42 From the browsers we support here, there is only one old one (we think) that supports Service Worker mode but does not natively support WebP: Firefox 64. All the others either support WebP natively, so don't load the polyfill, or else don't support SW, in which case they use the polyfill we provide in the Kiwix JS package, which doesn't have this race condition. I'd be interested in the outcome of the investigations from the iOS side. |
@Jaifroid The MWoffliner bug has been fixed and released, I wonder therefore about the pertinence of keeping this ticket open? |
@kelson42 I've just tested this in Firefox 64 (portable) using Was the fix applied to this ZIM? I see there is now an August |
This zim file has been created only a week after the PR has been merged. I strongly suspect it was the older version of MWoffliner which made it. Would you be able please to rerun the very same test with the most recent version of this ZIM file http://download.kiwix.org/zim/.hidden/endless/wikipedia_en_endless_maxi_2021-08.zim ? |
OK, will do, but it will take some time to download on the wifi I'm currently using! |
@kelson42 I've now downloaded the latest English-language endless (August), and it appears to be working well on Firefox 64 in SW mode. In this mode, the supplied webp decoder (from the ZIM) is used, and I have been browsing around several articles with many images, and have switched several times from SW mode to jQuery mode (which uses our custom solution) and back again, and I am not seeing any missing images. Everything seems to load fine. I don't see lazy loading in action, but that doesn't matter (it could be the old version of Firefox that can't do lazy loading). As far as I'm concerned this issue is fixed in latest ZIMs. Many thanks! |
PS Does sotoki have a similar solution, or do they use jpeg still? |
@Jaifroid yes, sotoki has a similar solution. If I recall properly I backported the glue I made to manipulate the polyfill from sotoki to mwoffliner (the one bundled with the polyfill was just rejecting requests on race conditions) |
I haven't seen this issue in a long time, so I would say it's confirmed fixed. |
Following initial investigation in #670 (comment), there is probably a race condition causing random failures in the WebP Polyfill loaded from the ZIM in browsers that support Service Worker mode but do not support WebP (e.g. Firefox 64, which can be installed as a portable package for testing this issue).
The main symptom is that images will fail to be converted by the Polyfill fairly randomly, usually a whole page at a time. It is usually possible to load and convert the images by visiting another page and then returning to the page that evinced the failure. This kind of random and inconsistent failure suggests a race condition.
Once the cause is discovered, if relevant, an issue should be raised on mwoffliner.
EDIT: "The ZIM" I am referring to is http://download.kiwix.org/zim/.hidden/custom_apps/wikipedia_en_medicine-app_maxi_2020-11.zim (which is the ZIM I have tested).
The text was updated successfully, but these errors were encountered: