Users can log in only once with --Newusers

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
VegOwOtenks
Posts: 3
Joined: Wed Jul 01, 2026 8:47 am

Users can log in only once with --Newusers

Post by VegOwOtenks »

I have been trying to set up a game server, wanting to fill in user accounts beforehand.

However, when I'm trying to set up the users, I noticed repeated connection problems:

Code: Select all

1: lua error:
	/etc/freeciv/database.lua:281: LuaSQL: UNIQUE constraint failed: fcdb_auth.name
stack traceback:
	: in function 'assert'
	/etc/freeciv/database.lua:281: in function 'user_save'
1: Error writing to database for: vego
I have set up the authentification as the manual instructs: `auth.conf`

Code: Select all

[fcdb]
backend="sqlite"
database="./user_auth.sqlite"
I then run the server with:

Code: Select all

freeciv-server -m --Database auth.conf --auth --Newusers
First time, I log in with user `vego` and password `12345678`, this are the logs:

Code: Select all

3: Connection request from vego from 127.0.0.1: c1 has client version 3.2.4
>
3: vego has connected from 127.0.0.1.
I then disconnect I try to log in again (same credentials), but this happens:

Code: Select all

3: Connection request from vego from 127.0.0.1
3: c2 has client version 3.2.4
>
1: lua error:
	/etc/freeciv/database.lua:281: LuaSQL: UNIQUE constraint failed: fcdb_auth.name
stack traceback:
	: in function 'assert'
	/etc/freeciv/database.lua:281: in function 'user_save'
1: Error writing to database for: vego
3: vego has connected from 127.0.0.1.
>
3: Lost connection: vego from 127.0.0.1 (read error) (player Vego).
3: Removing player Vego.
3: AI*1 has been added as Easy level AI-controlled player (classic).
I'm running Freeciv version 3.2.4, am I holding it wrong?
VegOwOtenks
Posts: 3
Joined: Wed Jul 01, 2026 8:47 am

Re: Users can log in only once with --Newusers

Post by VegOwOtenks »

This is almost certainly a bug, I cannot reproduce with Freeciv 3.2.2.

I'd be grateful to learn about any workarounds!
VegOwOtenks
Posts: 3
Joined: Wed Jul 01, 2026 8:47 am

Re: Users can log in only once with --Newusers

Post by VegOwOtenks »

I have documented the bug at https://redmine.freeciv.org/issues/2063.
Post Reply