WebGL Photon Chat demo scene doesn't work.

After facing issues with Photon Chat implementation in our WebGL application I tried getting some project to work on WebGL to see if maybe we were handling something wrong on our end. I uploaded the chat demo scene and after pressing "Connect" on the main screen the application freezes and in the console it says:
Connect failed. SocketImplementationConfig is null for protocol WebSocketSecure: {(ConnectionProtocol)Udp=(MonoType)ExitGames.Client.Photon.SocketUdp, (ConnectionProtocol)Tcp=(MonoType)ExitGames.Client.Photon.SocketTcp}

What can I do to make it work again?

(I already went through the forum questions and none of them solved my issue, neither on the demo scene nor on our own scene).

Thanks in advance!

Best Answer

  • ManEatingSheep
    edited February 2018 Answer ✓
    OK we managed to solve the issue.
    Apparently there is an issue in the ChatPeer.cs file where the SocketImplementationConfig is set.
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp", false);
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp-firstpass", false);
    Type websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcpThread, Assembly-CSharp", false);
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcpThread, Assembly-CSharp-firstpass", false);
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcpCoroutine, Assembly-CSharp", false);
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcpCoroutine, Assembly-CSharp-firstpass", false);

Answers

  • Version information:

    Unity 2017.2.1f1
    Photon v1.89
  • ManEatingSheep
    edited February 2018 Answer ✓
    OK we managed to solve the issue.
    Apparently there is an issue in the ChatPeer.cs file where the SocketImplementationConfig is set.
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp", false);
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp-firstpass", false);
    Type websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcpThread, Assembly-CSharp", false);
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcpThread, Assembly-CSharp-firstpass", false);
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcpCoroutine, Assembly-CSharp", false);
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcpCoroutine, Assembly-CSharp-firstpass", false);