Photon self hosted + WebGL

Options
Drepo
Drepo
edited September 2016 in Photon Server
Hi guys,
I'm having some trouble trying to setup up a self hosted Photon on Amazon EC2 for a WebGL game.

For testing pourposes I'm building the exact project from the Unity Asset Store (Photon Unity Networking Free).
My Desktop build can connect just fine on the server, but I coudn't make it work with WebGL.

To ensure it wasn't a port problem, I set all traffic free to my EC2 instance.
Also, I followed this tutorial to allow wss:
https://doc.photonengine.com/en-us/onpremise/current/operations/websockets-ssl-setup

In my Unity project, I changed the Photon port to 9090 (which I understand to be the wss port for Photon Server).

So, here is what shows up in the brower console when I run the game:

WebSocket connection to [myServerAddress] failed: WebSocket opening handshake was canceled

blob:http://localhost/6df23e17-feca-434b-9caf-f87980cb1006:8852 Exiting receive thread due to error: Abnormal disconnection

blob:http://localhost/6df23e17-feca-434b-9caf-f87980cb1006:8852 Cause: 1023


Do I have to do anything else to run the server on WebGL? Something on the client side maybe?

Best Answer

  • Drepo
    Drepo
    Answer ✓
    Options
    I managed to solve everything and get the game running.

    One problem was Chrome not liking my self-signed certificate I was using for testing.

    Another thing was the Loadbalancing.dll.config. I put my public IP there for my GameServer and fixed the port for Websocket from "19091" to "9091" which is the default port as set in the PhotonConfig.

Answers

  • Drepo
    Drepo
    Answer ✓
    Options
    I managed to solve everything and get the game running.

    One problem was Chrome not liking my self-signed certificate I was using for testing.

    Another thing was the Loadbalancing.dll.config. I put my public IP there for my GameServer and fixed the port for Websocket from "19091" to "9091" which is the default port as set in the PhotonConfig.