Skip to content

Player UUID#175

Merged
tasaje1 merged 37 commits into
developmentfrom
player_UUID
Jun 17, 2026
Merged

Player UUID#175
tasaje1 merged 37 commits into
developmentfrom
player_UUID

Conversation

@5eli

@5eli 5eli commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Context
implemented UUID-based authentification mechanism for players and preventing new joins during an active game

Description
players now get assigned a unique UUID upon joining a lobby. This helps in preventing new players from joining a lobby once a game has started

Changes in the code base
LobbyService: Added logic to validate UUIDs upon reconnecting
LobbyController: updated joinLobby endpoint to accept an optional uuid parameter
Lobby: updated player management to support UUID validation
Tests: updated/added tests in LobbyTest and LobbyServiceTest

Additional information
N/A

@the-only-queen-anna the-only-queen-anna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aktuell startet mit diesem Code bei mir der Server nicht, ich bekomme immer einen Error von der Datenbank, bitte mal selber probieren, ob das bei dir geht

@5eli

5eli commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator Author

Aktuell startet mit diesem Code bei mir der Server nicht, ich bekomme immer einen Error von der Datenbank, bitte mal selber probieren, ob das bei dir geht

Kannst du mir eventuell die genaue Fehlermeldung schicken, die du bekommst? Dann kann ich mir das genauer anschauen.

@the-only-queen-anna

the-only-queen-anna commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [uuid] in table [player] ich bekomm immer das, ist das ein lokales Problem ? eigentlich baue ich immer alle container neu

@5eli

5eli commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator Author

Hab's mir angeschaut, die uuid-Spalte hat in der Datenbankmigration gefehlt. Das sollte jetzt mit der neuen Migration gefixt sein.

Ich kann es bei mir leider nicht vollständig testen, weil ich beim Starten des Servers aktuell immer einen PostgreSQL-Authentifizierungsfehler bekomme (password authentication failed for user "codenames_user"). Könntest du nochmal schauen, ob es bei dir jetzt funktioniert?

Comment thread src/main/java/com/codenames/codenames/backend/lobby/domain/Lobby.java Outdated
@XtophB XtophB linked an issue Jun 14, 2026 that may be closed by this pull request
@XtophB XtophB removed a link to an issue Jun 14, 2026
@XtophB XtophB linked an issue Jun 14, 2026 that may be closed by this pull request
@XtophB

XtophB commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Aktuell startet mit diesem Code bei mir der Server nicht, ich bekomme immer einen Error von der Datenbank, bitte mal selber probieren, ob das bei dir geht

Server DB problem should be fixed. Hab container mit dem Branch UUID Branch Build gestartet
image

@the-only-queen-anna the-only-queen-anna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hab noch einige Kommentare...

Comment thread src/main/java/com/codenames/codenames/backend/lobby/api/LobbyController.java Outdated
Comment thread src/main/java/com/codenames/codenames/backend/lobby/api/LobbyController.java Outdated
Comment thread src/main/java/com/codenames/codenames/backend/lobby/api/LobbyController.java Outdated
Comment thread src/main/java/com/codenames/codenames/backend/lobby/domain/Lobby.java Outdated
Comment thread src/main/java/com/codenames/codenames/backend/lobby/domain/Lobby.java Outdated
Comment thread src/main/java/com/codenames/codenames/backend/lobby/domain/Lobby.java Outdated
Comment thread src/main/java/com/codenames/codenames/backend/lobby/domain/Lobby.java Outdated
@tasaje1 tasaje1 linked an issue Jun 15, 2026 that may be closed by this pull request
Comment thread src/main/java/com/codenames/codenames/backend/lobby/api/LobbyController.java Outdated
@the-only-queen-anna

Copy link
Copy Markdown
Collaborator

Das führt bei jeder Request zu einer NullPointerException java.lang.NullPointerException: null
at java.base/java.util.Objects.requireNonNull(Objects.java:209) ~[na:na]
at com.codenames.codenames.backend.lobby.api.LobbyController.createLobby(LobbyController.java:55) ~[!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[na:na]

@sonarqubecloud

Copy link
Copy Markdown

@XtophB

XtophB commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Tested this in meeting with @tasaje1 @the-only-queen-anna @ad-devel. It works 👍

@XtophB XtophB requested a review from tasaje1 June 17, 2026 17:43

@tasaje1 tasaje1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested during meeting works lgtm :)

@the-only-queen-anna the-only-queen-anna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alle changes umgesetzt, LGTM

@tasaje1 tasaje1 merged commit df6656a into development Jun 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DB auf Player UUID anpassen Player UUID

5 participants