HeliosLauncher
HeliosLauncher copied to clipboard
Catch invalid JSON parsing in pullLocal and pullRemote + Extra error overlay information
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:

All seems good now.
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.