Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resume multiplayer due to server.userNameNotPresent error #63

Open
SteeveDroz opened this issue May 18, 2020 · 8 comments
Open

Comments

@SteeveDroz
Copy link

Version

freecol v0.11.6 on Linux/Fedora 31

Description

NOTE: I'm using FreeCol in French, so the name of the menus can differ slightly as I translate them into English on the fly.

On a hotseat game (2 clients on the same computer, one as the owner of the game), with a previously saved game, Player 1, the owner, opens the saved game and waits for Player 2.

Player 2 clics on "New game" and chooses "Join a multiplayer game" with server 127.0.0.1:3541. He also chooses "Player 2" as his name.

If Player 2 chooses his own previous nation, an error message tells him that the username isn't present in the game.

WARNING: ServerAPI. login error, messageId: server.userNameNotPresent message: Player "Guillaume Ier" is not present in the game.
Known players = ( Player 1 Player 2 Louis XIV Élizabeth Iere )

Desired behavior

Use the name specified in the "Name" field as the username instead of the default name for the nation.

Why am I sure the problem comes from there?

If Player 2 chooses another nation, when prompt, he can take it without a problem.

Workaround

Unzip the saved game, change name="Player 2" to name="Guillaume Ier" and rezip the saved game, but seriously, that's not even an option for lambda users.

@SteeveDroz
Copy link
Author

I tried to fix the bug, but the codebase is so huge that I lost myself :-(
My starting point is the following:

} else if ((present = getPlayer(serverGame)) == null) {

I hope it can help someone!

@mpope042
Copy link
Member

mpope042 commented Jun 6, 2020

Have you tried using a nightly release? This code has changed a fair bit since 0.11.6.

@dvr-1com
Copy link

dvr-1com commented Feb 9, 2021

Yep. On freecol-git-20201224 error confirmed

@dvr-1com
Copy link

Here is some workaround:
https://github.com/dvr-1com/saveFix

@markusschaber
Copy link

This error seems still present on 20220217.
We ran into a freeze while trying to negotiate peace between two human players (both on Windows 10). The client of the user sending the peace offer froze when the other user accepted the offer without changing.
After killing the frozen client, I cannot rejoin, getting this error. However, it seems I could join as spanish (which is an AI player).

@Calebrw
Copy link
Member

Calebrw commented Apr 21, 2022

This error seems still present on 20220217. We ran into a freeze while trying to negotiate peace between two human players (both on Windows 10). The client of the user sending the peace offer froze when the other user accepted the offer without changing. After killing the frozen client, I cannot rejoin, getting this error. However, it seems I could join as spanish (which is an AI player).

Sorry this is happening. @mpope042 can take a look at some point, but I can't make any promises.

@markusschaber
Copy link

At least we have the workaround of editing the name within the savegame, or manually entering the default name when starting the game.

@mpope042
Copy link
Member

mpope042 commented May 1, 2022

Please try the new release 0.12.0 and see if the problem is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants