Page 1 of 1

Unity WebGL build secure socket connection problem !

Posted: 20 Jan 2017, 11:31
by faisal007
Hello,

We are tying to connect our game in unity with secure web socket and getting this error:
Error[WebSocketLayer] Connection error: An exception has occurred while connecting. at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses, Int32 port) [0x00000] in <filename unknown>:0
UnityEngine.Debug:Log(Object)
port 8843 is also open and we have setup keystore as well in admin panel.

TCP connection is working fine.

Thanks.

Re: Unity WebGL build secure socket connection problem !

Posted: 20 Jan 2017, 16:49
by Lapo
Can you try without SSL, in other words standard websocket?
If it works we can exclude a number of issues and concentrate on SSL specific issues.

Thanks

Re: Unity WebGL build secure socket connection problem !

Posted: 23 Jan 2017, 11:14
by faisal007
Standard web-socket is working, and now WSS is also working on facebook, the problem was our network administrator wasn't setup SSL properly.

Re: Unity WebGL build secure socket connection problem !

Posted: 23 Jan 2017, 12:29
by faisal007
Hello,

Just short note, i m seeing this Warning "org.jboss.netty.handler.codec.http.websocketx.WebSocketHandshakeException: not a WebSocket handshake request: missing upgrade".

Is this a problem ?

Re: Unity WebGL build secure socket connection problem !

Posted: 23 Jan 2017, 14:49
by Lapo
Hi,
it is difficult to say. Regular clients should not cause that exception.

Maybe this is due to other web clients attempting to talk to the server and failing. This can happen on a live server, but I wouldn't expect this to be caused by a client using the official SFS2X API.

Hope it helps