Unity-Technologies / com.unity.netcode.gameobjects

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.09k stars 430 forks source link

A ConnectionRequestMessage was received from the server on the client side. #2776

Open Tom3652 opened 7 months ago

Tom3652 commented 7 months ago

Description

When a client with an error in one script (not related to NGO) tried to join my host, i have received this error and the console asked me to fill this issue with the given message.
I am using :

Reproduce Steps

  1. Make an error in one script that is loaded with a NetworkBehavior but which compiles
  2. Try to join a host with a client and see the error using the Relay / Lobby setup

Actual Outcome

[Netcode] A ConnectionRequestMessage was received from the server on the client side. This should not happen. Please report this to the Netcode for GameObjects team at https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/issues and include the following data: Message Size: 94. Message Content: 02 01 7d 9a e2 a5 01 b2 36 17 b3 01 46 c4 ca 04 01 39 3b e8 2c 01 ab c9 50 60 01 53 a3 38 44 01 d3 f6 1c b8 01 a6 22 89 97 01 b5 fe 01 74 01 be 97 be 73 01 9d 9a 5c 01 01 e9 51 97 17 01 8a f7 e7 83 01 42 7f 88 c6 01 97 a3 f5 46 01 00 00 00 00 01 77 b5 3e 2a e0 a3 ad 22 00 00 00 00 
UnityEngine.Debug:LogError (object)
Unity.Netcode.NetworkLog:LogError (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.6.0/Runtime/Logging/NetworkLog.cs:34)
Unity.Netcode.NetworkManagerHooks:OnVerifyCanReceive (ulong,System.Type,Unity.Netcode.FastBufferReader,Unity.Netcode.NetworkContext&) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.6.0/Runtime/Messaging/NetworkManagerHooks.cs:91)
Unity.Netcode.NetworkMessageManager:CanReceive (ulong,System.Type,Unity.Netcode.FastBufferReader,Unity.Netcode.NetworkContext&) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.6.0/Runtime/Messaging/NetworkMessageManager.cs:325)
Unity.Netcode.NetworkMessageManager:HandleMessage (Unity.Netcode.NetworkMessageHeader&,Unity.Netcode.FastBufferReader,ulong,single,int) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.6.0/Runtime/Messaging/NetworkMessageManager.cs:407)
Unity.Netcode.NetworkMessageManager:ProcessIncomingMessageQueue () (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.6.0/Runtime/Messaging/NetworkMessageManager.cs:458)
Unity.Netcode.NetworkManager:NetworkUpdate (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.6.0/Runtime/Core/NetworkManager.cs:42)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.6.0/Runtime/Core/NetworkUpdateLoop.cs:185)
Unity.Netcode.NetworkUpdateLoop/NetworkEarlyUpdate/<>c:<CreateLoopSystem>b__0_0 () (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.6.0/Runtime/Core/NetworkUpdateLoop.cs:208)

Expected Outcome

Not sure because there is indeed an error client side while joining but this should not be seen this way i guess

Environment

Tom3652 commented 7 months ago

I have not checked before but it seems there are many similar issue to mine : #2738

fluong6 commented 7 months ago

Hi @Tom3652,

I hope this message finds you well.

We're currently investigating on this issue and would greatly appreciate the chance to better understand it. To facilitate this process, could you kindly provide a sample project?

You can follow the Unity Bug Reporter instructions to submit a sample of your project.

Thank you

zaclovagi commented 7 months ago

To whoever it may concern, This appears to happen for me only when the domain hasn't been reloaded and I've reentered play mode.

Tom3652 commented 6 months ago

Hi @fluong6 Yes sure i will do that once i am not in a rush anymore, i am confident 99% able to reproduce it with the steps i have mentioned