Photon Chat not working in WebGL

AnkitAnkit
edited January 29 in Photon Chat
Hi All,

I am having issues connecting to Photon Chat on WebGL platform(It runs absolutely fine on Standalone)

Getting the following error


Connect failed. SocketImplementationConfig is null for protocol WebSocketSecure: {(ConnectionProtocol)Udp=(MonoType)ExitGames.Client.Photon.SocketUdp, (ConnectionProtocol)Tcp=(MonoType)ExitGames.Client.Photon.SocketTcp}
UnityEngine.Debug:LogError(Object)
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.<>c__DisplayClass145_0:b__0()
ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.Chat.ChatClient:Service() (at Assets/PhotonChatApi/ChatClient.cs:269)



I have already tried all the solutions listed on the forum, but none of them seem to work

> Made sure the transport protocol is set to WebSocketSecure(Did not work)

this.chatClient = new ChatClient(this);
bool isConnecting = this.chatClient.Connect("XYZ", "1.0", new ExitGames.Client.Photon.Chat.AuthenticationValues("USERNAME"));
> Copied the following code onto ChatPeer to find the "WebSocketType"(Did not work)

websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp", false);
websocketType = websocketType ?? Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp-firstpass", false);
Unity Version : 2018.2.11f1
Photon Unity Networking 2v2.2


Can anyone please suggest what i might be doing wrong here?

Thanks

Answers

  • Hi @Ankit,

    Thank you for choosing Photon and sorry for the delay!

    I just tested a WebGL build of the Photon Chat demo in PUN 2.6 and it works.
    I guess there was an issue with Photon Chat in 2.2 and now it's fixed.

    Can you confirm?
  • SerepaSerepa
    edited April 25
    Hi @JohnTube,

    I don't know about PUN but I can confirm that it still doesn't work on WebGL in Photon Chat v.1.4. (Unity 2019.1.0f2)

    Could you please suggest how to fix it (I also tried all the methods described above)?

    Thanks.
  • Hi @Serepa,

    Thank you for choosing Photon!

    That asset was not updated and should be.
    We will work on that.

    In the meantime (and even in the future), I recommend that you import PUN2 and use Photon Chat from there.
    Ignore and skip the other subfolder under "Photon" as Photon Chat should work with only "Photon/PhotonChat" and "Photon/PhotonLibs".
Sign In or Register to comment.