Fusion WEBGL Disconnect issues

Hi, i am developing a simple racing game for WEBGL. I'm encountering some issues.


-When testing on my own system with multiple instances game runs fine on 2/6/8 player modes, but when i test it with remote players it start giving me errors.

-Issues frequency increases in 6 and 8 player modes. In 2 player mode issues rarely happen. And when testing(2 player mode) with remote desktop user, issues vanish.

-Players disconnect randomly with different shutdown reasons each time. DisconnectedbyPluginLogic, PhotonCloudTimeout, Error.

-Sometimes upon entering a session player is instantly disconnected.


What i've done:


-Optimized my scene to around 300 batches.

-Tried changing protocol from udp to tcp and websocket.

-Studied fusion kart project to see if i'm doing something wrong.

-Refactored my code to avoid abnormal behaviors when a user disconnects mid race.


Any form of help is appreciated.

@Tobias

Answers

  • It is something that should work, so we need to debug / ask a few questions.

    If you didn't update Fusion in a while, please get a recent nightly build. There are always a lot of fixes.

    WebGL must always use WSS (this is done automatically, I think) and can not host sessions. Are you running in Shared Mode?

    Which Unity version is (we only support recent LTS versions) this and which browser?

    It makes sense to check if the full callstack is available for the exception logs. Please copy paste, if possible.

  • @Tobias I'm running in Host/Client mode.

  • Host Mode in WebGL is always done via Relay. This is not our favorite solution but we currently can't connect JS clients directly. Also: If a WebGL tab is in the background, it will execute very very poorly (to save performance). I guess a Host would be as good as offline this way.

    Maybe switch to Shared mode and use a very new Fusion version (there were fixes for Shared mode, which should be used).