I'm rebuilding a flash app that has been working fine for a few years and moving it to Unity. I'm on the latest version of Unity 2019.3, SFS server 2.13.6. My problem is that I can connect my app with the Unity editor and the pc build but the WebGL build never connects. The admin tool logs never show any activity either when I try to connect. It will work fine using the stand alone pc build exe only.
I'd appreciate some thoughts on what I might look at to try to solve this issue.
Can't connect to server with WebGL build in Unity
Re: Can't connect to server with WebGL build in Unity
Hi,
are you checking the error logs in the browser's console? Chances are there the cause of the problem is found there.
For example it could be a crossdomain issue, if you're testing from the local file system.
Let us know
are you checking the error logs in the browser's console? Chances are there the cause of the problem is found there.
For example it could be a crossdomain issue, if you're testing from the local file system.
Let us know
Re: Can't connect to server with WebGL build in Unity
I haven't been able to find any errors in my browser window that would help. The browser console shows no errors. The admin tool shows no activity. I thought I would experiment and used the Connector example from the asset store. I changed the hostport to my SFS server ip address and ran it in the Unity editor and it connected fine. When I built it as a WebGL platform it wouldn't connect. The only error message I find says " 'ws: <ip address> /websocket' failed: Connection closed before receiving a handshake response." The admin tool however does show activity in that it says a session is created but the onConnection event never fires and then the panel shows an SFS Error WebSocketLayer connection error.
Any advice would be appreciated.
Any advice would be appreciated.
Re: Can't connect to server with WebGL build in Unity
Could you please make sure that websocket is properly configured in your server? Go to the AdminTool's Server Configurator module, Web server tab and check if it is configured like this:
If yes, I would like to try to connect to your server myself. Can you please share (privately by email) your server address? You can write to support AT smartfoxserver DOT com.
If yes, I would like to try to connect to your server myself. Can you please share (privately by email) your server address? You can write to support AT smartfoxserver DOT com.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Who is online
Users browsing this forum: No registered users and 64 guests