3arthqu4ke / headlessmc

Minecraft on the command line
https://3arthqu4ke.github.io/headlessmc/
MIT License
142 stars 16 forks source link

Cannot login to microsoft account #91

Closed realcatirl closed 1 month ago

realcatirl commented 10 months ago
Launching version 1.12.2, 21a8126f-3e16-433f-90b8-ff7da87d2730
me.earth.headlessmc.launcher.auth.AuthException: Invalid credentials or tokens
        at me.earth.headlessmc.launcher.auth.AccountManager.login(AccountManager.java:62)
        at me.earth.headlessmc.launcher.auth.AccountManager.login(AccountManager.java:40)
        at me.earth.headlessmc.launcher.launch.ProcessFactory.run(ProcessFactory.java:41)
        at me.earth.headlessmc.launcher.launch.ProcessFactory.run(ProcessFactory.java:34)
        at me.earth.headlessmc.launcher.command.LaunchCommand.execute(LaunchCommand.java:51)
        at me.earth.headlessmc.launcher.command.LaunchCommand.execute(LaunchCommand.java:19)
        at me.earth.headlessmc.launcher.command.FindByCommand.execute(FindByCommand.java:31)
        at me.earth.headlessmc.command.CommandContextImpl.executeCommand(CommandContextImpl.java:44)
        at me.earth.headlessmc.command.CommandContextImpl.execute(CommandContextImpl.java:31)
        at me.earth.headlessmc.command.line.ConsoleListener.listen(ConsoleListener.java:22)
        at me.earth.headlessmc.command.line.CommandLineImpl.listen(CommandLineImpl.java:26)
        at me.earth.headlessmc.launcher.Main.runHeadlessMc(Main.java:90)
        at me.earth.headlessmc.launcher.Main.main(Main.java:35)
Couldn't launch 1.12.2: Invalid credentials or tokens
[10:20:49] [main/INFO] [LaunchCommand]: Deleting 21a8126f-3e16-433f-90b8-ff7da87d2730
alexking commented 10 months ago

Ran into an issue like this, turned out I needed to login to my Microsoft account on my web browser to add a secondary email address

realcatirl commented 10 months ago

Ran into an issue like this, turned out I needed to login to my Microsoft account on my web browser to add a secondary email address

So adding secondary email and using it to login fixes the issue?

3arthqu4ke commented 10 months ago

Have you also checked whats going on at https://account.live.com/activity?

realcatirl commented 10 months ago

Have you also checked whats going on at https://account.live.com/activity?

Incorrect password entered. My paassword is random sequence of characters, including for example \ this may couse errors?

3arthqu4ke commented 10 months ago

Oh I think so, will have to fix that. For now you have to escape every \ with another \, so \\. You also need to escape " with \.

fragmuffin commented 9 months ago

I'm having a similar issue:

$ docker run --rm -it 3arthqu4ke/headlessmc
$ hmc login me@gmail.com "passw0rd"
Logging in...
Failed to log you in: Invalid credentials or tokens
me.earth.headlessmc.launcher.auth.AuthException: Invalid credentials or tokens
        at me.earth.headlessmc.launcher.auth.AccountManager.login(AccountManager.java:62)
        at me.earth.headlessmc.launcher.command.login.LoginCommand.lambda$login$0(LoginCommand.java:56)
        at me.earth.headlessmc.launcher.command.login.LoginCommand.execute(LoginCommand.java:41)
        at me.earth.headlessmc.command.CommandContextImpl.executeCommand(CommandContextImpl.java:44)
        at me.earth.headlessmc.command.CommandContextImpl.execute(CommandContextImpl.java:31)
        at me.earth.headlessmc.launcher.QuickExitCliHandler.checkQuickExit(QuickExitCliHandler.java:47)
        at me.earth.headlessmc.launcher.Main.runHeadlessMc(Main.java:86)
        at me.earth.headlessmc.launcher.Main.main(Main.java:35)

Which, has my details redacted... but the output is identical. I've triple-checked the email and password, even copy/pasting from command-line into a web-login. My account has 2FA, so I suspect this is due to #90

realcatirl commented 9 months ago

Yea, that may be the reason

3arthqu4ke commented 9 months ago

Oh I think so, will have to fix that. For now you have to escape every \ with another \, so \\. You also need to escape " with \.

Have you also tried this out?

realcatirl commented 9 months ago

Oh I think so, will have to fix that. For now you have to escape every \ with another \, so \\. You also need to escape " with \.

Have you also tried this out?

Yea, I tried