Photon Chat not working in WebGL ?

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Photon Chat.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Photon Chat not working in WebGL ?

Untrusted
2020-06-09 21:46:30

Hi,

my project works correctly both in windows and in linux, but i can't seem to make Photon Chat (downloaded from the asset store, Photon Chat Free but i have the 100CCU subscription) work in webGL.

Previously, I had a message in the console that said that it was unable to connect to wss, so i temporarily setup CORS to allow all resources. Now the message does not appear anymore, but photon chat still is not working.

I tried explicitly to set

this.chatClient.TransportProtocol = ExitGames.Client.Photon.ConnectionProtocol.WebSocketSecure;

and the intellisense says "Note: No Websocket IPhotonSocket implementation is in this assembly" - I am unsure if this could be the issue?

do i need to install PUN rather than photon chat? I only require the chat as a feature? Any pointers are appreciated, thanks!

Comments

JohnTube
2020-06-10 08:11:15

Hi @Untrusted,

Thank you for choosing Photon!

I assume you downloaded this.
It could be that it has some issue yes as we don't update that asset often.

What I recommend is that you download PUN 2 as it includes Photon Chat.
Import only "Assets\Photon\PhotonChat" and "Assets\Photon\PhotonLibs".
Or import all and ignore files not needed OR you can clean up unused or not needed files, delete folders "Assets\PhotonRealtime" and "Assets\PhotonUnityNetworking".

Untrusted
2020-06-10 22:20:35

Thank you,

i updated to the PUN2 package, changed my code to reflect the PUN2 example changes and now it works!

JohnTube
2020-06-11 11:31:56

I see, thanks for the update.
If changes were not that big maybe we could update Photon Chat easily then and avoid this in the future.

Untrusted
2020-07-01 21:08:45

Hi again, sorry for upping this post but I was not sure if it warranted a new thread!

It seems that the WebGL version sometimes disconnects the client (never happened with the linux or windows client). Any way to catch this, or is there maybe something specific that has to be done that I am missing? It seems like this happen after a long idle session, as long as people can type this doesn't happen.

Thank you!

Back to top