aidn3 / hypixel-guild-discord-bridge

Service connects multiple guilds and discord server together
MIT License
18 stars 6 forks source link

Minecraft restarts infinitely after session token is remade #179

Open aidn3 opened 2 months ago

aidn3 commented 2 months ago

error message "Profile not found, please restart your launcher if you recently created your profile":

[2024-05-14T15:10:14.567] [DEBUG] Censured - connecting to proxy...
[2024-05-14T15:10:14.786] [DEBUG] Censured - connection to proxy established. forwarding proxied connection to minecraft
[2024-05-14T15:10:15.214] [ERROR] Censured - Minecraft Bot Error:  Error: Profile not found, please restart your launcher if you recently created your profile
    at call (/bridges/censured/node_modules/yggdrasil/src/utils.js:35:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async join (/bridges/censured/node_modules/yggdrasil/src/Server.js:20:12)
[2024-05-14T15:10:15.351] [ERROR] Censured - Minecraft bot disconnected from server,attempting reconnect in 5 seconds
HyxonQz commented 2 months ago

src\instance\minecraft\minecraft-instance.ts https://github.com/aidn3/hypixel-guild-discord-bridge/blob/2ddcf4a36d3d6022a12a1c6406a2552b3c3feb87/src/instance/minecraft/minecraft-instance.ts#L116-L119 After reseaching similar issues, many recommend using username field to force a re-login. Also clear credential cache to remove any potentially invalid details.

aidn3 commented 2 months ago

src\instance\minecraft\minecraft-instance.ts

https://github.com/aidn3/hypixel-guild-discord-bridge/blob/2ddcf4a36d3d6022a12a1c6406a2552b3c3feb87/src/instance/minecraft/minecraft-instance.ts#L116-L119

After reseaching similar issues, many recommend using username field to force a re-login. Also clear credential cache to remove any potentially invalid details.

username field is only used to to create a cache dir. Force full re-login by changing the cache dir will require user input, which isn't ideal. The solution would be to only redo the last step of the authentication while using the previous cached ones.

How to detect it and how to force re-login the last step is still pending.