Wont work for Web gl Unity

edited November 2017 in Photon Chat
Hi all!.
I have a question.
1. i use pun chat. run in editor and see
" Connect failed. SocketImplementationConfig is null for protocol WebSocketSecure: {(ConnectionProtocol)Udp=(MonoType)ExitGames.Client.Photon.SocketUdp, (ConnectionProtocol)Tcp=(MonoType)ExitGames.Client.Photon.SocketTcp}
ChatGui:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Demos/DemoChat/ChatGui.cs:330)
ExitGames.Client.Photon.Chat.ChatClient:ExitGames.Client.Photon.IPhotonPeerListener.DebugReturn(DebugLevel, String) (at Assets/PhotonChatApi/ChatClient.cs:800)
ExitGames.Client.Photon.Chat.ChatClient:Service() (at Assets/PhotonChatApi/ChatClient.cs:269)
ChatGui:Update() (at Assets/Photon Unity Networking/Demos/DemoChat/ChatGui.cs:163)"
whats happened? any solution?
2. if i use standalone chat in editor all done, but if i run this in web gl build i have some trouble
SystemException: Thread creation failed.
(Filename: currently not available on il2cpp Line: -1)

Have anyone solution?
ps. tested on 5.6.4 and 2017.2 unity and PUN 1.87 and Chat 1.3


  • RomanKorchmenko
    edited November 2017
  • upd: in unity 5.6.4 mix of PUn and Standalone chat work fine(but have bug with Cyrillic alphabet)
  • Hello Friends.

    same error in unity 3D WebGL photon chat plugin run in webgl but not working.

    error :
    Connect failed. SocketImplementationConfig is null for protocol WebSocketSecure: {(ConnectionProtocol)Udp=(MonoType)ExitGames.Client.Photon.SocketUdp, (ConnectionProtocol)Tcp=(MonoType)ExitGames.Client.Photon.SocketTcp}

    Any idea?
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited January 2018
    Hi @chintan4503,

    Thank you for choosing Photon!

    In your project, make sure to have a "WebSocket" or "PhotonWebSocket" folder under "Assets/Plugins".
    It should be inside the "PhotonAssets" folder of the SDK.

    Also, make sure to set WSS as the transport protocol before connecting:

    either pass it to the constructor of the class that extends LoadBalancingClient or

    this.TransportProtocol = ConnectionProtocol.WebSocketSecure;
  • Ralph_K
    edited January 2018
    i also encountered this issue with the latest version ( PUN 1.88 Unity 5.6.5p1 )

    Connect failed. SocketImplementationConfig is null for protocol WebSocketSecure: {(ConnectionProtocol)Udp=(MonoType)ExitGames.Client.Photon.SocketUdp, (ConnectionProtocol)Tcp=(MonoType)ExitGames.Client.Photon.SocketTcp}

    WebSocket folder exists, and Connection protocol is set to ConnectionProtocol.WebSocketSecure.

    Any ideas?
  • Ralph_K
    edited September 2018
    Ok fixed.

    I copied these lines from NetworkingPeer.cs to ChatPeer.cs ConfigUnitySockets()
    websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp", false);
                websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp-firstpass", false);
  • Confirmed for webgl this is the only thing that fixes photon chat