question

Bikram Singh avatar image
Bikram Singh asked

Multiplayer Server refusing connection to client - Unity/Mirror/WebGL

Hi,

I have been building a multiplayer game in Unity using Mirror. Previously we were targeting PC and our server builds were working great over UDP. Recently we decided to move to WebGL and we made the changes accordingly to the server build and deployed them. Now we are facing a strange issue where the server is not responding to any connection requests by the client.

After a few tries, even the RequestMultiplayerServer function starts returning no host found even when a server is on standby. I even tried to hardcode the server IP and frontend ports on the client but the server simply refuses to respond. I checked the VM Agent logs and they don't show any errors. We are currently just testing locally on the Unity editor. I am not sure how to debug this issue.

unity3dmultiplayerwebhooks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered

have you tried debugging locally with the LocalMultiplayerAgent? I think WebGL needs a certificate to connect, check this out if that's the case PlayFab/MultiplayerServerSecureWebsocket: Reverse proxy sample project to enable web socket connections over https to PlayFab hosted game servers. (github.com)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.