NetworkManager Error: Server client disconnect error: 1

Error on Unity 5.4.2f2 Personal

  1. Created New Application - “Server”

а) Created Scene
b) Add NetworkManager component on Camera
c) Add NetworkManagrHUD component on Camera
d) off “AutoCreatePlayer”

  1. Created New Application - “Client”
    same a) b) c) d)

  2. Run “Server Only” and run “Client” in two different applications

  3. Connection is completed, but when close “Client” application then error on “Server”:

Server client disconnect error:1
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()
OnDisconnectError error:6
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

Event “public override void OnServerDisconnect (NetworkConnection conn)” don’t execute

I don’t have code, only have components.

Why this error? Help please.

1 Like

As I know, it will be fixed on 5.4.3

who knows when 5.4.3?

5.4.2p3 has a fix for this error:

Clients can disconnect happily again \o/

Install patch 5.4.2p3, last error is fixed, but new error:

ServerDisconnected due to error: Timeout
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

2 Likes

Still have the same error on 5.4.2 p3;

I have 5.4.2 and I get these two errors.

Update 5.4.3 fixed it. https://unity3d.com/ru/get-unity/download/archive

Ahh thank you kind sir.

1 Like

I got this error on 5.5.0f3.

1 Like

This is the method from Unity’s networking source (NetworkManager.cs for 5.4 branch) that you’ll want to override in your network manager:

public virtual void OnServerDisconnect(NetworkConnection conn)
{
    NetworkServer.DestroyPlayersForConnection(conn);
    if (conn.lastError != NetworkError.Ok)
    {
        if (LogFilter.logError)
        {
             Debug.LogError("ServerDisconnected due to error: " + conn.lastError);
        }
    }
}

Then you can handle the errors however you want to :slight_smile:

Ok but I would think that the issue is that the error happens in the first place not how to avoid the printing.

For my part, my server randomly goes off what would go in the override?

1 Like

Same issue here with unity 5.4.2. With Unity 5.4.3 I get this error:

I don’t have any of this issues with Unity 5.4.1, but in that version the editor is unstable, crashes and bugs that later versions don’t have. It’s a bit uncomfortable working with 5.4.1.

We have been witnessing major issues with basic apps running on UNET with Unity 5.5.

Using Hololens, any device may disconnect quite regularly.

Also, having 3 clients (one server) and one common object only (NetworkTransform), the system will quickly throw an error claiming to many data are being sent (Can’t remember the message wording).

Also, I see often tutorials testing with a build running aside the editor on the same computer. Works fine but the same code on different devices and you get some authority errors. Actually, my code was faulty but it would not tell me.

I would think that since messages were all coming with same ip address, the program is not able to make the difference between the server and the client.

Finally, as we are using Hololens, it is often not anchoring properly or only after 2 to 5min. That time is long enough to actually lose the connection so basically it is not really happening.

1 Like

“ServerDisconnected due to error: Timeout”. Same error when client disconnects on Unity 5.5.1f1

I’m also getting “ServerDisconnected due to error: Timeout” on Unity 5.5.1p1

Same here.
Is there a fix comming @aabramychev ?

ps: i notice that this was the same or a close bug:

@Paradoks , check please with 5.4 which we published here (see newtransport release) 5.6.0 will contain all of these changes. Beside this, it is difficult to say without reproducing this bug, is it timeout caused by internal bug, caused by wrong configuration (Confid,NetDropThreshold should be set to 80, and probably OverflowThreshold should be increased) or real timeout when server or client doesn’t receive any packet for DisconnectTimeout period.

It’s still happening with Unity 5.6.0b11

[Error] ClientDisconnected due to error: Timeout

Unity version 5.5.2p1 personal 64bit (iPhone 5S)