Joining An Expired Session Does Nothing

by ADMIN 40 views

Introduction

When attempting to join a session that has expired or no longer exists, the client-side application does not display any error messages or notifications. This behavior is unexpected, as users would typically expect to receive an error message or notification when trying to join a non-existent session.

Expected Behavior

The expected behavior when joining a session that has expired or no longer exists is for the client-side application to display an error message or notification indicating that the session does not exist. This would provide users with a clear indication of what went wrong and allow them to take corrective action.

Current Bug Behavior

The current bug behavior is that when a user attempts to join a session that has expired or no longer exists, nothing happens on the client-side. There are no error messages or notifications displayed, and the application appears to be functioning normally.

Steps to Reproduce

To reproduce this issue, follow these steps:

  1. Join a session that has expired or no longer exists. For example, try joining a session with the ID "6DEC34F".
  2. Observe the client-side application and note that nothing happens.

Relevant Logs and/or Screenshots

The relevant logs and/or screenshots for this issue are as follows:

Server Logs

Behavior for Old Existing Session

2025-03-09 12:42:31,039 INFO  [fr.zel.ses.soc.sec.SocketSecurityEndpoints] (executor-thread-533) [GET] /socket/register
2025-03-09 12:42:31,136 INFO  [fr.zel.ses.SessionSocket] (vert.x-eventloop-thread-0) [ANYONE] Connecting...
2025-03-09 12:42:31,168 INFO  [fr.zel.ses.SessionSocket] (vert.x-eventloop-thread-0) [dadodasyra] Connected !
2025-03-09 12:42:31,168 INFO  [fr.zel.ses.SessionManager] (vert.x-eventloop-thread-0) [6DEC34F] dadodasyra Join the session !
2025-03-09 12:42:31,168 ERROR [fr.zel.ses.SessionManager] (vert.x-eventloop-thread-0) Unable to send message socket is closed

Normal Behavior with Unexisting Session

2025-03-09 12:46:45,527 INFO  [fr.zel.ses.soc.sec.SocketSecurityEndpoints] (executor-thread-534) [GET] /socket/register
2025-03-09 12:46:45,631 INFO  [fr.zel.ses.SessionSocket] (vert.x-eventloop-thread-3) [ANYONE] Connecting...
2025-03-09 12:46:45,662 INFO  [fr.zel.ses.SessionSocket] (vert.x-eventloop-thread-3) [dadodasyra] Connected !
2025-03-09 12:46:45,662 WARN  [fr.zel.ses.SessionSocket] (vert.x-eventloop-thread-3) [UNDEFINED PLAYER] Disconnected
2025-03-09 12:46:45,662 ERROR [fr.zel.ses.SessionManager] (vert.x-eventloop-thread-3) [AAAAAA] Session doesnt exist for player : dadodasyra

Client Logs

Behavior for Old Existing Session

[2025-03-09][12:42:27][WARN][tao::platform_impl::platform::event_loop::runner] NewEvents emitted without explicit RedrawEventsCleared
[2025-03-09][12:42:27][WARN][tao::platform_impl::platform::event_loop::runner] RedrawEventsCleared emitted without explicit MainEventsCleared
[2025-03-09][12:42:30][INFO][webview::unknown] [HTTPAxios.ts][GET] https://betterfleet.fr/api/socket/register
[2025-03-09][12:42:31][INFO][webview::unknown] [Fleet.ts] Opening web socket
[2025-03-09][12:42:31][INFO][webview::unknown] [Fleet.ts] Sending player informations

Normal Behavior with Unexisting Session

[2025-03-09][12:46:27][INFO][webview::unknown] [HTTPAxios.ts][GET] https://betterfleet.fr/api/socket/register
[2025-03-09][12:46:27][INFO][webview::unknown] [Fleet.ts] Opening web socket
[2025-03-09][12:46:27][INFO][webview::unknown] [Fleet.ts] Sending player informations
[2025-03-09][12:46:27][INFO][webview::unknown] [Fleet.ts][WebSocket] Receive SESSION_NOT_FOUND message
[2025-03-09][12:46:27][INFO][webview::unknown] [Fleet.ts][WebSocket] As been closed

Conclusion

Q: What is the current bug behavior when joining an expired session?

A: The current bug behavior is that when a user attempts to join a session that has expired or no longer exists, nothing happens on the client-side. There are no error messages or notifications displayed, and the application appears to be functioning normally.

Q: What is the expected behavior when joining an expired session?

A: The expected behavior is for the client-side application to display an error message or notification indicating that the session does not exist. This would provide users with a clear indication of what went wrong and allow them to take corrective action.

Q: Why is it important to display an error message or notification when joining an expired session?

A: Displaying an error message or notification when joining an expired session is important because it provides users with a clear indication of what went wrong. This allows users to take corrective action and try again, rather than being left in the dark and wondering what happened.

Q: What are some possible causes of this bug behavior?

A: Some possible causes of this bug behavior include:

  • Incorrect session ID: The session ID being used to join the session may be incorrect or outdated.
  • Session expiration: The session may have expired due to inactivity or other reasons.
  • Server-side issue: There may be a server-side issue preventing the client-side application from receiving the expected error message or notification.

Q: How can I reproduce this issue?

A: To reproduce this issue, follow these steps:

  1. Join a session that has expired or no longer exists. For example, try joining a session with the ID "6DEC34F".
  2. Observe the client-side application and note that nothing happens.

Q: What are some possible solutions to this issue?

A: Some possible solutions to this issue include:

  • Displaying an error message or notification: Modify the client-side application to display an error message or notification when attempting to join a session that has expired or no longer exists.
  • Checking session ID: Modify the client-side application to check the session ID being used to join the session and display an error message or notification if it is incorrect or outdated.
  • Implementing session expiration handling: Modify the server-side application to handle session expiration and display an error message or notification to the client-side application when a session has expired.

Q: How can I troubleshoot this issue?

A: To troubleshoot this issue, follow these steps:

  1. Check the client-side logs: Check the client-side logs to see if there are any error messages or notifications being displayed.
  2. Check the server-side logs: Check the server-side logs to see if there are any error messages or notifications being displayed.
  3. Test the issue: Test the issue by attempting to join a session that has expired or no longer exists and observe the client-side application's behavior.

Q: What are some best practices for handling session expiration?

A: Some best practices for handling session expiration include:

  • Implementing session expiration handling: Modify the server-side application to handle session expiration and display an error message or notification to the client-side application when a session has expired.
  • Displaying an error message or notification: Modify the client-side application to display an error message or notification when attempting to join a session that has expired or no longer exists.
  • Providing a clear indication of what went wrong: Modify the client-side application to provide a clear indication of what went wrong when attempting to join a session that has expired or no longer exists.