Skip to content

Client Disconnect Due to Timeout Is Not Logged #2390

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

Open
Reag opened this issue Jan 19, 2023 · 4 comments
Open

Client Disconnect Due to Timeout Is Not Logged #2390

Reag opened this issue Jan 19, 2023 · 4 comments
Labels
priority:low This issue has low priority and will take some time to be resolved stat:imported Status - Issue is tracked internally at Unity stat:reply-needed Awaiting reply from Unity account Tracking Has been added to tracking type:bug Bug Report

Comments

@Reag
Copy link

Reag commented Jan 19, 2023

Description

When ever a client times out due to inactivity, no special information is sent to the console to distinguish it from other types of disconnects. This occurs even if the NetworkManagers LogLevel is set to 'Developer'.

Reproduce Steps

  1. Setup a Multiplayer Scene or Project
  2. Set 'Heartbeat Timeout MS' to a value higher than 'Disconnect Timeout MS'
  3. Build or Run project on a server and a client
  4. Await for at least 'Disconnect Timeout MS' in time with no messages being sent between the client and server.

Actual Outcome

Client is disconnected with a generic message, specifically [Netcode] Disconnect Event From 0

Expected Outcome

Some kind of error message that is useful to determining why a client disconnected (For example: Client Timed Out).

Screenshots

Sample Config:
image

Environment

  • OS: Windows 10
  • Unity Version: 2021.3.12f1
  • Netcode Version: 1.2.0

Additional Context

This, combined with the DisconnectReason being empty bug, makes debugging the cause of certain client disconnect events near impossible.

In addition, I would consider adding some validation to the UnityTransport editor to ensure that the heartbeat is lower than the disconnect timeout

@Reag Reag added stat:awaiting-triage Status - Awaiting triage from the Netcode team. type:bug Bug Report labels Jan 19, 2023
@NoelStephensUnity
Copy link
Collaborator

NoelStephensUnity commented Jan 19, 2023

@Reag
If you set your LogLevel to Developer in the NetworkManager you should get a console log output. However, I am noticing that it only logs locally so we could make an adjustment so it generates a network server log that will log the message to the console locally and if the instance is not the server it will send the message to the server and generate a console log there as well.

@NoelStephensUnity NoelStephensUnity added priority:low This issue has low priority and will take some time to be resolved stat:import Status - Issue is going to be saved internally stat:imported Status - Issue is tracked internally at Unity and removed stat:awaiting-triage Status - Awaiting triage from the Netcode team. stat:import Status - Issue is going to be saved internally labels Jan 19, 2023
@Reag
Copy link
Author

Reag commented Jan 22, 2023

Even when set to Developer, the message is still just [Netcode] Disconnect Event From 0. This makes is impossible to diagnose the reason for the disconnect.

@OmegaCosmos
Copy link

Necroing to say still happening in Unity 6000.0.23f1

@NoelStephensUnity NoelStephensUnity added the Tracking Has been added to tracking label Jan 8, 2025
@michalChrobot michalChrobot added stat:awaiting-triage Status - Awaiting triage from the Netcode team. stat:awaiting-response Awaiting response from author. This label should be added manually. and removed stat:awaiting-triage Status - Awaiting triage from the Netcode team. stat:awaiting-response Awaiting response from author. This label should be added manually. labels Jan 16, 2025
@afarchy
Copy link

afarchy commented Feb 13, 2025

We are seeing similar issues in distributed authority. The client will disconnect unexpectedly with the message [Netcode] Disconnect Event From 0

Is there any way to debug these disconnects?

@michalChrobot michalChrobot added the stat:reply-needed Awaiting reply from Unity account label Apr 1, 2025
@EmandM EmandM added stat:import Status - Issue is going to be saved internally and removed stat:imported Status - Issue is tracked internally at Unity labels May 26, 2025
@michalChrobot michalChrobot added stat:imported Status - Issue is tracked internally at Unity and removed stat:import Status - Issue is going to be saved internally labels Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low This issue has low priority and will take some time to be resolved stat:imported Status - Issue is tracked internally at Unity stat:reply-needed Awaiting reply from Unity account Tracking Has been added to tracking type:bug Bug Report
Projects
None yet
Development

No branches or pull requests

6 participants