You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Play standalone build & editor, using one as host and the other as client (doesn't matter which).
Observe InvalidMessageException on client.
Desktop (please complete the following information):
OS: Windows 10
Build target: standalone
Unity version: 2019.4.18f1 LTS
Mirror branch: MirrorNG
Exception
: Closed connection: connection([::1]:7777). Invalid message Mirror.InvalidMessageException: OnDeserialize failed for: object=Player(Clone) component=Mirror.Examples.Basic.Player sceneId=0. Possible Reasons:
* Do Mirror.Examples.Basic.Player's OnSerialize and OnDeserialize calls write the same amount of data?
* Was there an exception in Mirror.Examples.Basic.Player's OnSerialize/OnDeserialize code?
* Are the server and client the exact same project?
* Maybe this OnDeserialize call was meant for another GameObject? The sceneIds can easily get out of sync if the Hierarchy was modified only in the client OR the server. Try rebuilding both.
at Mirror.NetworkIdentity.OnDeserializeSafely (Mirror.NetworkBehaviour comp, Mirror.NetworkReader reader, System.Boolean initialState) [0x00021] in A:\unity_tests\net_test_2019_4_LTS\Library\PackageCache\com.mirrorng.mirrorng@62.0.0\Runtime\NetworkIdentity.cs:898
at Mirror.NetworkIdentity.OnDeserializeAllSafely (Mirror.NetworkReader reader, System.Boolean initialState) [0x0002a] in A:\unity_tests\net_test_2019_4_LTS\Library\PackageCache\com.mirrorng.mirrorng@62.0.0\Runtime\NetworkIdentity.cs:915
at Mirror.ClientObjectManager.ApplySpawnPayload (Mirror.NetworkIdentity identity, Mirror.SpawnMessage msg) [0x000db] in A:\unity_tests\net_test_2019_4_LTS\Library\PackageCache\com.mirrorng.mirrorng@62.0.0\Runtime\ClientObjectManager.cs:339
at Mirror.ClientObjectManager.OnSpawn (Mirror.SpawnMessage msg) [0x00118] in A:\unity_tests\net_test_2019_4_LTS\Library\PackageCache\com.mirrorng.mirrorng@62.0.0\Runtime\ClientObjectManager.cs:374
at Mirror.NetworkConnection+<>c__DisplayClass24_0`1[T].<RegisterHandler>b__0 (Mirror.INetworkConnection _, T value) [0x00001] in A:\unity_tests\net_test_2019_4_LTS\Library\PackageCache\com.mirrorng.mirrorng@62.0.0\Runtime\NetworkConnection.cs:152
at Mirror.NetworkConnection+<>c__DisplayClass22_0`1[T].<MessageHandler>g__AdapterFunction|0 (Mirror.INetworkConnection conn, Mirror.NetworkReader reader, System.Int32 channelId) [0x00025] in A:\unity_tests\net_test_2019_4_LTS\Library\PackageCache\com.mirrorng.mirrorng@62.0.0\Runtime\NetworkConnection.cs:121
at Mirror.NetworkConnection.InvokeHandler (System.Int32 msgType, Mirror.NetworkReader reader, System.Int32 channelId) [0x00014] in A:\unity_tests\net_test_2019_4_LTS\Library\PackageCache\com.mirrorng.mirrorng@62.0.0\Runtime\NetworkConnection.cs:259
at Mirror.NetworkConnection.TransportReceive (System.ArraySegment`1[T] buffer, System.Int32 channelId) [0x00011] in A:\unity_tests\net_test_2019_4_LTS\Library\PackageCache\com.mirrorng.mirrorng@62.0.0\Runtime\NetworkConnection.cs:295
UnityEngine.Logger:LogError(String, Object)
Mirror.ILoggerExtensions:LogError(ILogger, Object) (at Library/PackageCache/com.mirrorng.mirrorng@62.0.0/Runtime/LogFactory.cs:43)
Mirror.NetworkConnection:TransportReceive(ArraySegment`1, Int32) (at Library/PackageCache/com.mirrorng.mirrorng@62.0.0/Runtime/NetworkConnection.cs:303)
Mirror.<ProcessMessagesAsync>d__40:MoveNext() (at Library/PackageCache/com.mirrorng.mirrorng@62.0.0/Runtime/NetworkConnection.cs:352)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1:Run() (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/CompilerServices/StateMachineRunner.cs:189)
Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/UniTask.cs:21)
Cysharp.Threading.Tasks.UniTaskCompletionSourceCore`1:TrySetResult(Int32) (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/UniTaskCompletionSource.cs:139)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`2:SetResult(Int32) (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/CompilerServices/StateMachineRunner.cs:328)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder`1:SetResult(Int32) (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs:201)
Mirror.KCP.<ReceiveAsync>d__35:MoveNext() (at Library/PackageCache/com.mirrorng.mirrorng@62.0.0/Runtime/Transport/Kcp/KcpConnection.cs:248)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`2:Run() (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/CompilerServices/StateMachineRunner.cs:313)
Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/UniTask.cs:21)
Cysharp.Threading.Tasks.UniTaskCompletionSourceCore`1:TrySetResult(AsyncUnit) (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/UniTaskCompletionSource.cs:139)
Cysharp.Threading.Tasks.AutoResetUniTaskCompletionSource:TrySetResult() (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/UniTaskCompletionSource.cs:386)
Mirror.KCP.KcpConnection:InputReliable(Byte[], Int32) (at Library/PackageCache/com.mirrorng.mirrorng@62.0.0/Runtime/Transport/Kcp/KcpConnection.cs:161)
Mirror.KCP.KcpConnection:RawInput(Byte[], Int32) (at Library/PackageCache/com.mirrorng.mirrorng@62.0.0/Runtime/Transport/Kcp/KcpConnection.cs:135)
Mirror.KCP.<ReceiveLoop>d__7:MoveNext() (at Library/PackageCache/com.mirrorng.mirrorng@62.0.0/Runtime/Transport/Kcp/KcpClientConnection.cs:51)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoid`1:Run() (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/CompilerServices/StateMachineRunner.cs:104)
Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/UniTask.cs:21)
Cysharp.Threading.Tasks.UniTaskCompletionSourceCore`1:TrySetResult(Object) (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/UniTaskCompletionSource.cs:139)
Cysharp.Threading.Tasks.DelayPromise:MoveNext() (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/UniTask.Delay.cs:520)
Cysharp.Threading.Tasks.Internal.PlayerLoopRunner:RunCore() (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/Internal/PlayerLoopRunner.cs:175)
Cysharp.Threading.Tasks.Internal.PlayerLoopRunner:Update() (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/Internal/PlayerLoopRunner.cs:145)
Cysharp.Threading.Tasks.Internal.PlayerLoopRunner:Run() (at Library/PackageCache/com.cysharp.unitask@7d21a75ea8/Runtime/Internal/PlayerLoopRunner.cs:104)
The text was updated successfully, but these errors were encountered:
Describe the bug
Using v62.5.3 or later causes InvalidMessageException when client connects. Tested with 2019.4.18f1 LTS, using
Basic
sample scene.To Reproduce
Basic
Basic
setup steps (build example scene)Desktop (please complete the following information):
Exception
The text was updated successfully, but these errors were encountered: