Unity WebGL build secure socket connection problem !

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

User avatar
faisal007
Posts: 37
Joined: 27 Sep 2016, 09:01

Unity WebGL build secure socket connection problem !

Postby faisal007 » 20 Jan 2017, 11:31

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.
User avatar
Lapo
Site Admin
Posts: 20043
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Unity WebGL build secure socket connection problem !

Postby Lapo » 20 Jan 2017, 16:49

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
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
faisal007
Posts: 37
Joined: 27 Sep 2016, 09:01

Re: Unity WebGL build secure socket connection problem !

Postby faisal007 » 23 Jan 2017, 11:14

Standard web-socket is working, and now WSS is also working on facebook, the problem was our network administrator wasn't setup SSL properly.
User avatar
faisal007
Posts: 37
Joined: 27 Sep 2016, 09:01

Re: Unity WebGL build secure socket connection problem !

Postby faisal007 » 23 Jan 2017, 12:29

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 ?
User avatar
Lapo
Site Admin
Posts: 20043
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Unity WebGL build secure socket connection problem !

Postby Lapo » 23 Jan 2017, 14:49

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
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 1 guest