mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
v1.0.0-beta.3 - Added error handling for LaunchWrapper failure.
Fixes #5.
This commit is contained in:
parent
845721a830
commit
58a8215b05
@ -598,6 +598,7 @@ function dlAsync(login = true){
|
||||
}
|
||||
proc.stdout.on('data', gameStateChange)
|
||||
proc.stdout.removeListener('data', tempListener)
|
||||
proc.stderr.removeListener('data', gameErrorListener)
|
||||
}
|
||||
}
|
||||
|
||||
@ -611,12 +612,28 @@ function dlAsync(login = true){
|
||||
}
|
||||
}
|
||||
|
||||
const gameErrorListener = function(data){
|
||||
data = data.trim()
|
||||
if(data.indexOf('Could not find or load main class net.minecraft.launchwrapper.Launch') > -1){
|
||||
console.error('Game launch failed, LaunchWrapper was not downloaded properly.')
|
||||
setOverlayContent(
|
||||
'Error During Launch',
|
||||
'The main file, LaunchWrapper, failed to download properly. As a result, the game cannot launch.<br><br>To fix this issue, temporarily turn off your antivirus software and launch the game again.<br><br>If you have time, please <a href="https://github.com/WesterosCraftCode/ElectronLauncher/issues">submit an issue</a> and let us know what antivirus software you use. We\'ll contact them and try to straighten things out.',
|
||||
'Okay'
|
||||
)
|
||||
setOverlayHandler(null)
|
||||
toggleOverlay(true)
|
||||
toggleLaunchArea(false)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// Build Minecraft process.
|
||||
proc = pb.build()
|
||||
|
||||
// Bind listeners to stdout.
|
||||
proc.stdout.on('data', tempListener)
|
||||
proc.stderr.on('data', gameErrorListener)
|
||||
|
||||
setLaunchDetails('Done. Enjoy the server!')
|
||||
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "westeroscraftlauncher",
|
||||
"version": "1.0.0-beta.2",
|
||||
"version": "1.0.0-beta.3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "westeroscraftlauncher",
|
||||
"version": "1.0.0-beta.2",
|
||||
"version": "1.0.0-beta.3",
|
||||
"description": "Custom modded launcher for Westeroscraft",
|
||||
"productName": "WesterosCraft Launcher",
|
||||
"main": "index.js",
|
||||
|
Loading…
Reference in New Issue
Block a user