HeliosLauncher
HeliosLauncher copied to clipboard
AssetGuard occasionally hangs at 99%
Originally discovered on MOONMOONOSS/HeliosLauncher although it is reproducible in an unmodified copy of dscalzi/HeliosLauncher. Occasionally when fully downloading a new copy of a server's assets, AssetGuard will stop reporting at 99%. The forked process does not close, so it might indicate that a DlTracker did not finish successfully (eg callback func errors).
AssetGuard has not started .xz extractions at this point IIRC
I doubt this will be fixed on v1, it will require a rewrite or heavy re-examining of the download code. The issue does not happen all the time, and when it does happen you can just reopen the launcher and run it again. There are some possible causes but I dont really want to get into that rn.
As for the xz stuff, the future of that is in doubt. Obviously we can keep the xz compressions, but pack has been deprecated in JDK 11 and removed in JDK 14. I'd like to hope that minimum requirements for MC eventually move past JDK 8.. so the compressed format should be changed to something else. Forge removed their pack.xz libraries from their cdn, probably for this exact reason.
Don't know if you still search a fix, but I patched this by adding a self-call to startAsyncProcess at the end of it, if the self.progress >= self.totaldlsize is false. Also, don't know if this is a proper fix, but it's still working.
Fix in assetguard.js at the end of startAsyncProcess method:
if(self.progress >= self.totaldlsize) {
if(self.extractQueue.length > 0){
self.emit('progress', 'extract', 1, 1)
//self.emit('extracting')
AssetGuard._extractPackXZ(self.extractQueue, self.javaexec).then(() => {
self.extractQueue = []
self.emit('complete', 'download')
})
} else {
self.emit('complete', 'download')
}
} else {
return self.startAsyncProcess(identifier, limit)
}