Error sending message: Connection ID is invalid. Likely caused by sending on stale connection 429496

hi, i am using Netcode for GameObjects for my game. I am using websocket. I get this error when the webgl client closes the browser.

Unity editor version: 2022.3.4f1
Netcode for GameObjects version: 1.5.1
Unity Transport version: 2.0.1

Can you try updating Unity Transport to 2.0.2? We’ve fixed a few issues related to WebSockets where disconnect events would fail to be propagated properly (often resulting in the error you’re seeing).

After updating Unity Transport my problem was solved.

hello again Mr simon, this happens on udp connection. as well is there a fix i can do for unity transport 1.4.1.
disconnection events are not propagated correctly. so im still trying to send voice data to a disconnected client.

You can try applying this change to NGO. It won’t address the issue of disconnection events not being propagated properly, but it will at least stop sends to stale connections.

Thank you very much