[0.18.7] Authenticating with token does not work: "auth error: Missing username"

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Gerkiz
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Fri Nov 30, 2018 3:36 pm
Contact:

[0.18.7] Authenticating with token does not work: "auth error: Missing username"

Post by Gerkiz »

Hello,

Updating to 0.18.7 and trying to start a server headless results with:

Code: Select all

Only one of token or username and password can be set at once.
What i've tried:

1. Username, token and no password (as before the update)

Code: Select all

0.564 Error CommandLineMultiplayer.cpp:88: Only one of token or username and password can be set at once.
2. Token only - no username/password

Code: Select all

91.740 Error ServerMultiplayerManager.cpp:710: Matching server connection failed: Error when creating server game: Download failed (status code 401): auth error: Missing username.
Am I doing something wrong?

Log is uploaded.

/Gerkiz

Morthan
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 07, 2015 5:24 pm
Contact:

Re: [0.18.7] Authenticating with token does not work: "auth error: Missing username"

Post by Morthan »

Having the same issue here but managed to start the server (and join and play). When using a token it seems you need to ditch both "username" and "password" from the server-settings.json config! It's a bit weird but it works, seems to only require the token, not the username?

I have the following settings in the server-settings.json:

Code: Select all

 "_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public",
  "username": "username",
  "password": "",

  "_comment_token": "Authentication token. May be used instead of 'password' above.",
  "token": "some.token.info.here",
The game won't start with this info.

Removing the "comment_credentials", "username" and "password" resulted in a started server. I could also join and play like normal.

Code: Select all

   "_comment_token": "Authentication token. May be used instead of 'password' above.",
  "token": "some.token.info.here",
Noticed the API send me a serverHash, I'm guessing this is important?

Code: Select all

   2.442 Hosting game at IP ADDR:({0.0.0.0:34197})
   2.442 Info HttpSharedState.cpp:54: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=4
   2.855 Info AuthServerConnector.cpp:66: Obtained serverPadlock for serverHash (this.is.important.right?) from the auth server.

Loewchen
Global Moderator
Global Moderator
Posts: 8308
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.18.7] Authenticating with token does not work: "auth error: Missing username"

Post by Loewchen »

Morthan wrote:
Tue Feb 18, 2020 5:47 pm
Having the same issue here but managed to start the server (and join and play). When using a token it seems you need to ditch both "username" and "password" from the server-settings.json config! It's a bit weird but it works, seems to only require the token, not the username?
Then you do NOT have the issue, ofc you need to remove username and password if you have the token set, that is the whole point.

Hanakocz
Inserter
Inserter
Posts: 39
Joined: Sun Jun 24, 2018 7:06 pm
Contact:

Re: [0.18.7] Authenticating with token does not work: "auth error: Missing username"

Post by Hanakocz »

Well, starting server is one thing, but do you have the server listed within public servers? :)

billbo99
Fast Inserter
Fast Inserter
Posts: 131
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: [0.18.7] Authenticating with token does not work: "auth error: Missing username"

Post by billbo99 »

0.18.8 fixes this

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.7] Authenticating with token does not work: "auth error: Missing username"

Post by Rseding91 »

billbo99 wrote:
Tue Feb 18, 2020 6:10 pm
0.18.8 fixes this
Yes.
If you want to get ahold of me I'm almost always on Discord.

Morthan
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 07, 2015 5:24 pm
Contact:

Re: [0.18.7] Authenticating with token does not work: "auth error: Missing username"

Post by Morthan »

Loewchen wrote:
Tue Feb 18, 2020 5:55 pm
Morthan wrote:
Tue Feb 18, 2020 5:47 pm
Having the same issue here but managed to start the server (and join and play). When using a token it seems you need to ditch both "username" and "password" from the server-settings.json config! It's a bit weird but it works, seems to only require the token, not the username?
Then you do NOT have the issue, ofc you need to remove username and password if you have the token set, that is the whole point.
Pardon me for thinking the token only replaced the password. Thought you still needed the username identifier.

Also forgot to adjust the starting part of the text. I actually had the issues and was looking at the forum to see if someone reported it already. Turned out they did and I wanted to add my stuff at it, but kept on experimenting. Found a "solution" so I adjusted the text partially.

Sorry for that!
Hanakocz wrote:
Tue Feb 18, 2020 6:08 pm
Well, starting server is one thing, but do you have the server listed within public servers? :)
I don't know. I'm currently joining on IP and give that out to my friends. It's handy if it shows in the serverlist but the IP part isn't that hard as the server logs show the external IP when starting.

Post Reply

Return to “Resolved Problems and Bugs”