First time poster here. Getting an error with the multiplayer lobby, specifically.
I only get this error when trying to connect to a server hosted on a web player and connecting via a windows build, vice versa. However, when i’m running on the same platform, e.g. windows server and a windows client i’m able to connect, same with the web build.
The network manager seems to find the server and even receives the server’s IP address. After around a minute, the timeout error is shows itself. Absolutely no idea why a client can’t connect to the server when the platform is different. Any help appreciated! Thanks in advance.
Woaka
Edit:
I managed to fix it! Upgraded unity from 5.1.2 to the latest version (5.2.1) and the timeout error no longer shows itself. Hope this helps anyone else with a similar error!
I’m on 5.2.1p4, and I get the same problem on a bad wifi and in local machine testing with Network Simulation on and set to worst case (20% packet loss and 400ms latency).
I imagine there are lots of potential issues that could result in a disconnect.
Mine is a really minimal case…I get the disconnect about 90 seconds the listener has connected to the broadcaster. There’s no sync data in my project - just events being synchronised by Cmd->Rpc calls. And it’ll go wrong even when no messages are being passed (except behind the scenes).
I tried putting in a manual heartbeat every 1s and 5s, but that didn’t help. I’m glad about that, since it’d be crazy if there wasn’t some kind of heartbeat built in.
What seems to have fixed it for me is to tweak the network manager configuration (all properties only visible in debug view in the inspector). I’ve been quite unscientific - I changed a lot and couldn’t tell you which values made the difference - but I’ll leave it here in case it gives someone a new idea to try.
Some of the timeouts were set much lower than the 400ms latency, so I moved them to 1000ms to allow time for a round trip.
The drop thresholds were at 5%, so I set those to higher than the network simulation’s 20%.
I set Max Combined Reliable Message Count to 1, to stop it from batching messages. Since I send messages so rarely, I figured there’s a possibility they just weren’t getting sent!
As I say, for me, some combination of those changes got rid of the disconnect.