Skip to content

Microsoft login expires every 3 days, clearing all credentials #300

@tiehu

Description

@tiehu

After logging into my Microsoft account using the login command (via the browser link https://www.microsoft.com/link?otc=...), the login consistently fails every 3 days (very precisely, always 3 days apart) with the following error:

[08:10:09] [main/INFO] [MinecraftAuth]: Authenticating with Xbox Live using SISU...
[08:10:15] [main/SEVERE] [AbstractLaunchProcessLifecycle]: Couldn't launch fabric-loader-0.16.13-1.21.4: status: 401 Unauthorized, error: 2148916276, error message: Unknown error
me.earth.headlessmc.api.command.CommandException: status: 401 Unauthorized, error: 2148916276, error message: Unknown error
        at me.earth.headlessmc.launcher.command.LaunchCommand.getAccount(LaunchCommand.java:95)
        at me.earth.headlessmc.launcher.command.LaunchCommand$ClientLaunchProcessLifecycle.getAccount(LaunchCommand.java:56)
        at me.earth.headlessmc.launcher.command.AbstractLaunchProcessLifecycle.runProcess(AbstractLaunchProcessLifecycle.java:114)
        at me.earth.headlessmc.launcher.command.AbstractLaunchProcessLifecycle.run(AbstractLaunchProcessLifecycle.java:60)
        at me.earth.headlessmc.launcher.command.LaunchCommand.execute(LaunchCommand.java:42)
        at me.earth.headlessmc.launcher.command.LaunchCommand.execute(LaunchCommand.java:20)
        at me.earth.headlessmc.launcher.command.FindByCommand.execute(FindByCommand.java:42)
        at me.earth.headlessmc.api.command.CommandContextImpl.executeCommand(CommandContextImpl.java:54)
        at me.earth.headlessmc.api.command.CommandContextImpl.execute(CommandContextImpl.java:33)
        at me.earth.headlessmc.api.command.line.CommandLine.lambda$new$0(CommandLine.java:45)
        at me.earth.headlessmc.jline.JLineCommandLineReader.read(JLineCommandLineReader.java:84)
        at me.earth.headlessmc.api.command.line.CommandLine.read(CommandLine.java:83)
        at me.earth.headlessmc.launcher.Main.runHeadlessMc(Main.java:61)
        at me.earth.headlessmc.launcher.Main.main(Main.java:20)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at me.earth.headlessmc.wrapper.Main.main(Main.java:35)

Couldn't launch fabric-loader-0.16.13-1.21.4: status: 401 Unauthorized, error: 2148916276, error message: Unknown error

At the same time, all stored credentials in the HeadlessMC/auth/.account.json file are cleared, forcing me to perform the login process again.

I suspect this is related to the token refresh mechanism. I am using HeadlessMC to perform a series of automated tasks through scripts and crontab jobs, so I would really appreciate a solution that does not require manual intervention (or at least not this frequently).

Thank you very much for your work on this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions