[0.14.2] Headless Creating game fails with 401 http status
Posted: Wed Aug 31, 2016 4:20 pm
by Bisa
I'm trying to start a server using a token in place of a password, but for some reason the server seems to be incorrectly omitting my username in the request to the matchmaking server
settings.json
{
"name": "Bisa's TestBox",
"description": "Test Server - Please ignore",
"tags": ["game", "tags"],
"max_players": "10",
"_comment_visibility": ["public: Game will be published on the official Factorio matching server",
"lan: Game will be broadcast on LAN",
"hidden: Game will not be published anywhere"],
"visibility": "public",
"_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public",
"username": "redacted",
"password": "",
"_comment_token": "Authentication token. May be used instead of 'password' above.",
"token": "redacted",
"game_password": "",
"_comment_verify_user_identity": "When set to true, the server will only allow clients that have a valid Factorio.com account",
"verify_user_identity": true
}
"name": "Bisa's TestBox",
"description": "Test Server - Please ignore",
"tags": ["game", "tags"],
"max_players": "10",
"_comment_visibility": ["public: Game will be published on the official Factorio matching server",
"lan: Game will be broadcast on LAN",
"hidden: Game will not be published anywhere"],
"visibility": "public",
"_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public",
"username": "redacted",
"password": "",
"_comment_token": "Authentication token. May be used instead of 'password' above.",
"token": "redacted",
"game_password": "",
"_comment_verify_user_identity": "When set to true, the server will only allow clients that have a valid Factorio.com account",
"verify_user_identity": true
}
log
as you can see, despite me including the username in settings.json the matchmaking server suggests it's missing when trying to create a new game "Authorization error (Missing username.)"0.000 2016-08-31 18:12:46; Factorio 0.14.2 (build 24403, linux64, headless)
0.000 Operating system: Linux
0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--config" "/opt/factorio/config/config.ini" "--port" "34197" "--start-server-load-latest" "--server-settings" "/opt/factorio/data/server-settings.json" "--autosave-interval" "10" "--autosave-slots" "3" "--allow-commands" "admins-only"
0.000 Read data path: /opt/factorio/data
0.000 Write data path: /opt/factorio
0.000 Binaries path: /opt/factorio/bin
0.005 Running in headless mode
0.007 Loading mod core 0.0.0 (data.lua)
0.009 Loading mod base 0.14.2 (data.lua)
0.060 Checksum for core: 1620335853
0.060 Checksum for mod base: 3867985917
0.279 Info PlayerData.cpp:45: Local player-data.json available, timestamp 1472659949
0.279 Info PlayerData.cpp:52: Cloud player-data.json unavailable
0.280 Custom inputs active: 0
0.280 Factorio initialised
0.281 Info ServerSynchronizer.cpp:27: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
0.281 Info ServerMultiplayerManager.cpp:570: mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
0.281 Info ServerMultiplayerManager.cpp:570: mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
0.281 Loading map /opt/factorio/saves/my_savegame.zip
0.296 Info Scenario.cpp:148: Map version 0.14.2-2
0.333 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 900459546
0.344 Info PosixUDPSocket.cpp:50: Opening socket at port 34197
0.344 Hosting game at port 34197
0.344 Info HttpSharedState.cpp:44: Downloading https://auth.factorio.com/generate-server-padlock
0.801 Info HttpSharedState.cpp:108: Status code: 200
0.801 Info AuthServerConnector.cpp:106: Obtained serverPadlock for serverHash (HXg69oo3CBDJU9FsdPPHcvPeyNMLgqUY) from the auth server.
0.801 Info ServerMultiplayerManager.cpp:570: mapTick(0) changing state from(CreatingGame) to(InGame)
0.801 Info ServerRouter.cpp:587: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
0.921 Info ServerRouter.cpp:500: Own address is 88.206.179.110:34197
1.428 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
1.428 Info HttpSharedState.cpp:108: Status code: 401
31.613 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
31.613 Info HttpSharedState.cpp:108: Status code: 401
61.731 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
61.731 Info HttpSharedState.cpp:108: Status code: 401
91.868 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
91.868 Info HttpSharedState.cpp:108: Status code: 401
91.884 Error ServerMultiplayerManager.cpp:504: Matching server connection failed: Error when creating server game: Authorization error (Missing username.)
122.039 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
122.039 Info HttpSharedState.cpp:108: Status code: 401
-- this repeats --
0.000 Operating system: Linux
0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--config" "/opt/factorio/config/config.ini" "--port" "34197" "--start-server-load-latest" "--server-settings" "/opt/factorio/data/server-settings.json" "--autosave-interval" "10" "--autosave-slots" "3" "--allow-commands" "admins-only"
0.000 Read data path: /opt/factorio/data
0.000 Write data path: /opt/factorio
0.000 Binaries path: /opt/factorio/bin
0.005 Running in headless mode
0.007 Loading mod core 0.0.0 (data.lua)
0.009 Loading mod base 0.14.2 (data.lua)
0.060 Checksum for core: 1620335853
0.060 Checksum for mod base: 3867985917
0.279 Info PlayerData.cpp:45: Local player-data.json available, timestamp 1472659949
0.279 Info PlayerData.cpp:52: Cloud player-data.json unavailable
0.280 Custom inputs active: 0
0.280 Factorio initialised
0.281 Info ServerSynchronizer.cpp:27: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
0.281 Info ServerMultiplayerManager.cpp:570: mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
0.281 Info ServerMultiplayerManager.cpp:570: mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
0.281 Loading map /opt/factorio/saves/my_savegame.zip
0.296 Info Scenario.cpp:148: Map version 0.14.2-2
0.333 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 900459546
0.344 Info PosixUDPSocket.cpp:50: Opening socket at port 34197
0.344 Hosting game at port 34197
0.344 Info HttpSharedState.cpp:44: Downloading https://auth.factorio.com/generate-server-padlock
0.801 Info HttpSharedState.cpp:108: Status code: 200
0.801 Info AuthServerConnector.cpp:106: Obtained serverPadlock for serverHash (HXg69oo3CBDJU9FsdPPHcvPeyNMLgqUY) from the auth server.
0.801 Info ServerMultiplayerManager.cpp:570: mapTick(0) changing state from(CreatingGame) to(InGame)
0.801 Info ServerRouter.cpp:587: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
0.921 Info ServerRouter.cpp:500: Own address is 88.206.179.110:34197
1.428 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
1.428 Info HttpSharedState.cpp:108: Status code: 401
31.613 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
31.613 Info HttpSharedState.cpp:108: Status code: 401
61.731 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
61.731 Info HttpSharedState.cpp:108: Status code: 401
91.868 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
91.868 Info HttpSharedState.cpp:108: Status code: 401
91.884 Error ServerMultiplayerManager.cpp:504: Matching server connection failed: Error when creating server game: Authorization error (Missing username.)
122.039 Info HttpSharedState.cpp:106: Downloading https://multiplayer.factorio.com/create-game
122.039 Info HttpSharedState.cpp:108: Status code: 401
-- this repeats --