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

Regression: In the UWP app, when the user selects Service Worker mode, the app no longer waits for user confirmation before accessing the PWA

Open Jaifroid opened this issue 1 year ago • 4 comments

More specifically, it waits a few seconds, then proceeds anyway.

Jaifroid avatar Aug 30 '22 08:08 Jaifroid

Oddly, this doesn't appear to be happening in the Wikivoyage or WikiMed versions. Maybe it was a glitch caused by failure to launch in SW mode one time.

Jaifroid avatar Sep 05 '22 17:09 Jaifroid

OK, I've determined that this occurs if the user has already set the "Allow Internet Access" switch to on in jQuery mode.

Jaifroid avatar Oct 10 '22 18:10 Jaifroid

This regression has another side effect: if the user has allowed Internet access, and then switches to SW mode, it will switch immediately (without asking), but it will also not remember that it had entered SW mode, so that next launch will go back to jQuery. This continues, until the user figures out that they need to turn off Internet access before requesting SW moder (which most users won't figure out). Very strange, I don't currently understand why this regression is occurring. I suspect a state stored in the UWP settings (not in JS) is not being cleared or set.

Jaifroid avatar Oct 11 '22 13:10 Jaifroid

This should now be fixed in https://github.com/kiwix/kiwix-js-windows/commit/daed6e93000017a364ba643388395c3a8e1edaea and https://github.com/kiwix/kiwix-js-windows/commit/23600ff9904a82c0689a266471f26803f34c0717. The worst effects are mitigated by updating the PWA app (done), but the full fix will have to await the next release of the base app.

Jaifroid avatar Oct 11 '22 16:10 Jaifroid