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

The last visited page is not always remembered and restored on re-launching the app

Open Jaifroid opened this issue 2 years ago • 4 comments

There appears to be a small bug affecting the first page navigated to after the app is launched. If the user exits the app after reading just one article, they may find themselves returned to the landing page on re-launching the app. This may be related to the function that stores the HTML of the last-visited page.

Jaifroid avatar Dec 06 '21 00:12 Jaifroid

@washere In fact there is also a regression with the new option to fix the UI bug with secondary displays. It causes the last-visited page to be forgotten, as you observed elsewhere. If you turn this option off, you will see that the last-visited page is remembered. This is in fact a failsafe mechanism that prevents the app getting stuck in a bootloop with problematic articles: if an article caused a crash, the app reloads to the landing page instead of attempting to reload the article. However, in this case it is being triggered wrongly because it sees the display reset as equivalent to a failed load of the article. This shouldn't be hard to correct.

Jaifroid avatar Dec 06 '21 06:12 Jaifroid

Thanks @Jaifroid I think you are right. Also even if no external monitor is used, the issue happens. I have a feeling it is to do with windows not granting access rights. They keep changing things with each Windows update that affects many apps.

As it is not an .exe but in WindowsApps, not easy to grant admin & write access for testing purposes,

This is from the properties of the running instance (in it's dropdown subnode item) in Task_Manager:

Screenshot 2021-12-06 185229

I could be totally wrong though. Will report if anything new. Thanks again.

P.S. Same in AppData_Roaming_Kiwix folder: AppData_Roaming_Kiwix

washere avatar Dec 06 '21 18:12 washere

This is internal to the app. It's a failsafe I myself put in to prevent a boot loop within the app. No need to grant admin rights! I'll fix this probably later this week, but it will take longer to get into the official release. By the way, Store app is now certified.

Jaifroid avatar Dec 06 '21 20:12 Jaifroid

Thanks, as i said this was for testing purposes, first thing i do after problems post_windows_updates, to trace bugs. Good you know the issue cause anyway. Looking forward to fix, no hurry for this anyway. Thanks for Store update too, will try. Have a good week.

P.S. Store version looks good WRT previous issues. Homepage is loaded by default on each relaunch. Wish i could have more than 2 versions installed: currently Store version/Winget + Electron Portable version). So I could set more default ZIM files to them, would have been so cool. Previous versions for both default to the same folder in AppData_Roaming. At least 2 is better than 1.

P.P.S. Wonder if a ZIM file could load another ZIM file. That way can have a zim file homepage with options: 1st or 2nd or 3rd or 4th etc ZIM file to load files called 1.zim 2.zim 3.zim etc. But i think zim files wihin Kiwix can not load another zim files.

washere avatar Dec 06 '21 21:12 washere