kiwix-js icon indicating copy to clipboard operation
kiwix-js copied to clipboard

Wait longer for the SW to cache assets before rebooting if the SW fails to register

Open Jaifroid opened this issue 1 month ago • 0 comments

The app contains code to cache its own assets, according to the SW specification, but it occasionally has to reboot itself when the SW fails to register. In KJS, this reboot is being issued too quickly, and sometimes the app gets into a loop whereby it reboots before assets have finished caching, causing a boot loop in rapid succession. I saw this some time ago in the PWA, and slowed the process down by giving it more time. Something similar should be added here -- or that whole code needs some debugging. I've only noticed this when testing on iOS on an iPhone (not on an iPad). It's not a target for this app, but it does expose an issue that should be fixed.

Jaifroid avatar May 23 '24 17:05 Jaifroid