uNet WebSocket Timeout Over Local Wifi

Hi Guys,

Pretty simple, but been struggling for 2 days. I have my Unity Editor acting as host. The program then builds for WebGL, and I have that running on my local PC via XAMPP. Running the editor as host and using the same PC using the url as the PC’s IP address works perfectly, the client is added to the game as per normal. Any other computer connected to the wifi gets the message:

blob:http://192.168.0.34/da3eb8f3-55fb-49cd-8f83-2249cb71e0a7:2 WebSocket connection to ‘ws://192.168.0.34:7777/’ failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

The code is super super simple:

public class GameManager : NetworkManager
{
    private void Start()
    {
        if (Application.isEditor)
        {
            StartHost();
        }
        else
        {
            useWebSockets = true;
            StartClient();
        }
    }
}

Does anyone have an idea what could be going on here?

Bumpity Bump

Probably software firewall settings on the host computer.

1 Like

Boom! Was exactly the issue. I swear Windows Defender is my biggest trojan!

1 Like