Skip to content
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

First Remote Client Fails for KCP + IL2CPP Builds #2916

Closed
MrGadget1024 opened this issue Sep 9, 2021 · 1 comment
Closed

First Remote Client Fails for KCP + IL2CPP Builds #2916

MrGadget1024 opened this issue Sep 9, 2021 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@MrGadget1024
Copy link
Collaborator

MrGadget1024 commented Sep 9, 2021

Describe the bug
Host client is fine. First remote client connects but hangs for 10 seconds and disconnects.
Telepathy also works correctly - bug only shows for KCP transport.

[IMPORTANT] How can we reproduce the issue, step by step:

  • Build Basic example as Server Build with IL2CPP selected in Project Settings
  • Enter play mode in editor, click Client
  • Client never shows player object, disconnects in 10 seconds
  • Click Client again...client works normally on 2nd and subsequent attempts

Note that console shows KCP: received unreliable message in state Connected. Disconnecting the connection. 5 times before actually kicking the client (Ping messages every 2 seconds).

Expected behavior
First client to connect should work normally

Desktop (please complete the following information):

  • OS: Windows
  • Build target: standalone IL2CPP
  • Unity version: 2019 LTS, 2020 LTS, 2021 LTS all exhibit the bug
  • Mirror branch: master

Headless Server Console Output for single client

Initialize engine version: 2019.4.30f1 (e8c891080a1f)
[Subsystems] Discovering subsystems at path D:/Unity/Builds/Mirror2019-3/Mirror2019-3_Data/UnitySubsystems
Forcing GfxDevice: Null
GfxDevice: creating device client; threaded=0
NullGfxDevice:
    Version:  NULL 1.0 [1.0]
    Renderer: Null Device
    Vendor:   Unity Technologies
Microsoft Media Foundation video decoding to texture disabled: graphics device is Null, only Direct3D 11 and Direct3D 12 (only on desktop) are supported for hardware-accelerated video decoding.
UnloadTime: 0.401800 ms
KcpTransport initialized!
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Mirror | mirror-networking.com | discord.gg/N9QVxbM
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Mirror.NetworkManager:Awake()

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

KCP: received unreliable message in state Connected. Disconnecting the connection.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
System.Action`1:Invoke(T)
kcp2k.KcpConnection:RawInput(Byte[], Int32)
kcp2k.KcpServer:TickIncoming()
Mirror.NetworkLoop:NetworkEarlyUpdate()
UnityEngine.LowLevel.UpdateFunction:Invoke()

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

KCP: received unreliable message in state Connected. Disconnecting the connection.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
System.Action`1:Invoke(T)
kcp2k.KcpConnection:RawInput(Byte[], Int32)
kcp2k.KcpServer:TickIncoming()
Mirror.NetworkLoop:NetworkEarlyUpdate()
UnityEngine.LowLevel.UpdateFunction:Invoke()

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

KCP: received unreliable message in state Connected. Disconnecting the connection.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
System.Action`1:Invoke(T)
kcp2k.KcpConnection:RawInput(Byte[], Int32)
kcp2k.KcpServer:TickIncoming()
Mirror.NetworkLoop:NetworkEarlyUpdate()
UnityEngine.LowLevel.UpdateFunction:Invoke()

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

KCP: received unreliable message in state Connected. Disconnecting the connection.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
System.Action`1:Invoke(T)
kcp2k.KcpConnection:RawInput(Byte[], Int32)
kcp2k.KcpServer:TickIncoming()
Mirror.NetworkLoop:NetworkEarlyUpdate()
UnityEngine.LowLevel.UpdateFunction:Invoke()

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

KCP: received unreliable message in state Connected. Disconnecting the connection.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
System.Action`1:Invoke(T)
kcp2k.KcpConnection:RawInput(Byte[], Int32)
kcp2k.KcpServer:TickIncoming()
Mirror.NetworkLoop:NetworkEarlyUpdate()
UnityEngine.LowLevel.UpdateFunction:Invoke()

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

KCP: Connection timed out after not receiving any message for 10000ms. Disconnecting.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
System.Action`1:Invoke(T)
kcp2k.KcpConnection:HandleTimeout(UInt32)
kcp2k.KcpConnection:TickIncoming_Authenticated(UInt32)
kcp2k.KcpConnection:TickIncoming()
kcp2k.KcpServer:TickIncoming()
Mirror.NetworkLoop:NetworkEarlyUpdate()
UnityEngine.LowLevel.UpdateFunction:Invoke()

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)
@MrGadget1024 MrGadget1024 added bug Something isn't working IL2CPP Effects IL2CPP builds only labels Sep 9, 2021
@MrGadget1024
Copy link
Collaborator Author

closing as duplicate of #2900

@MrGadget1024 MrGadget1024 added duplicate This issue or pull request already exists and removed bug Something isn't working IL2CPP Effects IL2CPP builds only labels Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants