|
|
@@ -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!')
|
|
|
|