HeliosLauncher icon indicating copy to clipboard operation
HeliosLauncher copied to clipboard

Catch invalid JSON parsing in pullLocal and pullRemote + Extra error overlay information

Open TheFlash787 opened this issue 5 years ago • 2 comments

Whilst having a look at possible solutions to a startup-loop when a user is using an old launcher version with an outdated distribution URL, I noticed that a json parse error was being thrown every time pullLocal was being attempted. I've gone ahead and caught the parse error so that we can reject the promise as intended, rather than letting the error cause the startup-loop.

Since it's now showing the intended invalid distribution index overlay, I've gone ahead and added a little more information to the error overlay, mentioning how the URL could be outdated and that a manual launcher update is recommended. Alongside this, there'll also be a button that takes them to the releases page to download from.

I hope this helps to at least eleviate any issues for users that are using outdated versions (unknowingly) that aren't aware there is a new release to update to (which updates the distro url).

The red area shows the overlay changes: image

TheFlash787 avatar Aug 12 '20 11:08 TheFlash787

All seems good now.

TheFlash787 avatar Aug 13 '20 08:08 TheFlash787

This is good, however we can tell if the current version is the latest. The download option should only be given if its not the latest.

dscalzi avatar Aug 24 '20 21:08 dscalzi