MultiMC / Launcher

A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once
https://multimc.org/
Other
4.29k stars 877 forks source link

403 when authenticating, can only play offline #2080

Closed vikanezrimaya closed 6 years ago

vikanezrimaya commented 6 years ago

System Information

MultiMC version: 0.6.0-1069 on lin64 and 0.6.0-develop-1068 on lin64

Operating System: Gentoo (used upstream builds from MultiMC.org)

Summary of the issue or suggestion:

Strange problem when authenticating, the Mojang server replies with Forbidden error.

If trying to go with existing account, it only allows to play offline.

What should happen:

Instances should launch in online mode and login should work (and it works in official launcher!)

Steps to reproduce the issue (Add more if needed):

The easy way

  1. Launch an instance
  2. Be disappointed when it says to pick offline name

The hard way

ATTENTION: This will make you unable to play Minecraft until the issue is fixed! Backup your accounts.json file first.

  1. Remove your account if any
  2. Try to login again
  3. See the error: An unknown error occured when trying to communicate with the authentication server: Error downloading https://authserver.mojang.com/authenticate - server replied: Forbidden

Suspected cause:

Something wrong with UA maybe? I dunno really.

Logs/Screenshots:

Cannot find an easy way to dump logs of MultiMC itself. Here is the snippet I find the most relevant:

  467.231 D Task "AuthenticateTask(0x2bc9950)" started
  468.794 D The request failed and the server gave no error message. Unknown error.
  468.795 C Task "AuthenticateTask(0x2bc9950)" failed:  "An unknown error occurred when trying to communicate with the authentication server: Error downloading https://authserver.mojang.com/authenticate - server replied: Forbidden"

Additional Info:

Not applicable.

calloatti commented 6 years ago

I had to reenter my password to play today, because it said I was disconnected. I could login with no problem.

Maybe MC auth servers were down for a while?

vikanezrimaya commented 6 years ago

Hm. Nope! My own crude authenticator works, it fetches the expected reply! The thing is, I dunno how to use it.

Here's the code, if you're interested.

#!/bin/bash

yggdrasil="https://authserver.mojang.com"
client_token="$([[ -e ~/.minecraft_token ]] || uuidgen -r >~/.minecraft_token; cat ~/.minecraft_token)"
authenticate() {
    read -rep "Enter your Minecraft login: " minecraft_login || return 1
    echo "$minecraft_login" | grep -q "@" || { read -N1 -rp "Warning: legacy username! Do you wanna proceed?" yn; [[ $yn == n || $yn == N ]] && return 1; }
    read -resp "Enter your password: " minecraft_password || return 1; echo
    authenticate_payload='{ "agent": { "name": "Minecraft", "version": 1 }, "username": "'$minecraft_login'", "password": "'$minecraft_password'", "clientToken": "'$client_token'" }'
    curl -H "Content-Type: application/json" -d "$authenticate_payload" $yggdrasil/authenticate
}
authenticate
echo
peterix commented 6 years ago
  1. Check the MultiMC log for SSL related errors.
  2. Make sure you are not using any proxy or VPN.
vikanezrimaya commented 6 years ago

VPN is disabled. Proxy... Oh here it is! One second, I'll check it out!

vikanezrimaya commented 6 years ago

Yep! Works! Closing.

vikanezrimaya commented 6 years ago

I used Tor earlier, and for some time it worked. Then Mojang started blocking Tor authentication request and (justly) revoked auth token my MultiMC instance used all the time, thinking I was hacked.