dscalzi / HeliosLauncher

☀ Custom launcher for modded minecraft written in Electron and Node.js
MIT License
855 stars 1.76k forks source link

"expiresAt" does not get populated, leading to invalid sessions errors. #217

Closed eDexiam closed 2 years ago

eDexiam commented 2 years ago

Hi, after doing some testing and checks I've noticed that the "expiresAt" field in the config does not get populated. The check that verifies if the account is expired always returns false meaning that the launcher will never attempt refreshing any of tokens be it MC or MS.

image

I've been able to pin point what the issue is in authmanager.js, the calculateExpiryDate method is async, however it is not awaited anywhere where it is used so the returned data is a promise instead of the expected number value. Simply awaiting the method from what I can tell should resolve the problem.

eDexiam commented 2 years ago

I forgot to mention this is an issue on the new 1.9.0 version that has just been released a few days ago.

dscalzi commented 2 years ago

I'll check

dscalzi commented 2 years ago

Good catch, thanks. Fixed with https://github.com/dscalzi/HeliosLauncher/commit/b0927224885e4307ac787fe779d64d60b0c8bc7c