WebGL SSL Issue

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

Moderators: Lapo, Bax

BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

WebGL SSL Issue

Postby BonyYousuf » 16 Apr 2015, 20:11

Hi,
I bought and setup an SSL for my server. lets say it is at server.game.com. If I go to https://server.game.com:8843 it loads the page with the following content showing a secured sign on the browser which means that the ssl is indeed installed

Code: Select all

{ SFS2X Websocket Index Page }


If I run the game in Editor while in WebGL build mode with host=server.game.com, port=8843 the game loads just fine. however when I build the webgl version, and then load it in a browser, it gives me this error when connecting to server

Code: Select all

[SFS - ERROR] Failed to lookup hostname server.game.com. Connection failed. Reason No such host is known

Interesting thing is, if instead of the domain name I use direct ip of the server the webgl build works just fine. However since my ssl is against domain not IP, I manually need to open a tab with address https://ip-address:8843 to confirm security exception due to SSL issue. Without this step of course the game didn't connect.

So what should I do now? Cleary connecting via ip is not a solution, since I can't ask my users to manually open a page and accept security exception. But domain name is not working either even though ssl is installed correctly. Have you tried connecting with domain name directly rather than ip address? Does it really work? Or should I get ssl against my IP instead of domain. I am not sure if It is possible to get ssl against IP due to some other issue. But if it is the only way, then I would have to find a way to make it happen. But I would really prefer if I can connect via domain name instead.

Please let me know your experience and advice.
Thanks
BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Re: WebGL SSL Issue

Postby BonyYousuf » 16 Apr 2015, 20:19

BTW if you go to https://server.game.com or http://server.game.com directly you will get error since, I have no apache server or anything install. However if you type http://server.game.com:8080 then you can see the default smartfox page. Not sure if this information helps. But including it anyhow.
BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Re: WebGL SSL Issue

Postby BonyYousuf » 16 Apr 2015, 23:18

Just made a small HTML5 project (not WebGL) with javascript api, I was able to connect with both via ip and via domain name. This proofs that there is no issue with server. So the problem must be with Unity5's WebGL API which can only connect via ip address but not via domain name.

Please tell me what I can do? Can you reproduce this problem? Can you guys fix it for me? If you want I can send you my server ip and domain name via email. That way you will be able to see if you can at least connect to the server or not.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WebGL SSL Issue

Postby Bax » 17 Apr 2015, 13:07

We can reproduce the issue.
The C# API, when passing a domain name instead of an IP address, internally resolves the name to an IP using this call:

Code: Select all

System.Net.Dns.GetHostEntry(domainName)

It seems that this code, when built by Unity for the browser, doesn't work anymore; it always return an error ("No such host is known").
We are now installing the latest version of Unity (5.0.1). If still not working, we will submit a bug to the Unity team.
Paolo Bax
The SmartFoxServer Team
BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Re: WebGL SSL Issue

Postby BonyYousuf » 17 Apr 2015, 13:11

I was trying with the latest version when I created this post. But please let me know if you have any luck.
BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Re: WebGL SSL Issue

Postby BonyYousuf » 17 Apr 2015, 13:17

BTW do you guys know if it possible to issue SSL certificate against IP address rather than domain name? Then I could avoid this issue. SSL verification requires to have access to one of the primary email address associated with the domain such as admin@domainname.com, webmaster@domainname.com. Which is why I can only issue against domain name not ip address. But please let me know if you know any workaround.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WebGL SSL Issue

Postby Bax » 17 Apr 2015, 13:21

We don't know if it is possible. Maybe you can ask your certificate provider.
Anyway this is something we would like to fix, as it should work fine with domain names.
Hopefully the Unity team will be fast in replying.
Paolo Bax
The SmartFoxServer Team
BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Re: WebGL SSL Issue

Postby BonyYousuf » 17 Apr 2015, 16:21

So did it work for you with Unity3d 5.0.1 version? If not have you reported the bug yet? Can you give me the link of the bug report?
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WebGL SSL Issue

Postby Bax » 17 Apr 2015, 17:13

No changes in Unity 5.0.1. We haven't reported the bug yet because we have a different approach to further verify.
Maybe there's no even need to contact the Unity team.
We will let you know in the next few days.
Paolo Bax
The SmartFoxServer Team
BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Re: WebGL SSL Issue

Postby BonyYousuf » 20 Apr 2015, 12:24

Any update guys? I am eagerly waiting on this
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WebGL SSL Issue

Postby Bax » 20 Apr 2015, 17:40

BonyYousuf wrote:Any update guys? I am eagerly waiting on this

Testing is in progress. Tomorrow we should be able to give you a feedback.
Paolo Bax
The SmartFoxServer Team
ApolloMeijer
Posts: 58
Joined: 16 Aug 2012, 10:05

Re: WebGL SSL Issue

Postby ApolloMeijer » 22 Apr 2015, 15:07

Hey guys

We have the exact same issue! Any updates??
This is currently the only thing still keeping us from release the game on Facebook.
We use unity 5.0.1f1.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WebGL SSL Issue

Postby Bax » 22 Apr 2015, 17:03

The issue is fixed in our dev environment. We need one or two more days to complete the testing, then we should be able to provide a beta (or should I say gamma?) version that you can use. Please send us an email, so we can send you the new DLL's as soon as they are ready.
Paolo Bax
The SmartFoxServer Team
ApolloMeijer
Posts: 58
Joined: 16 Aug 2012, 10:05

Re: WebGL SSL Issue

Postby ApolloMeijer » 22 Apr 2015, 20:20

For some reason i couldn't PM you or find a email to send you specific.
We would be happy to help you test it tomorrow, We will have it running in facebook canvas for testing (yes, it makes a difference, facebook is so strict) . you can send the DLL files to a.meijer@orangegames.com.
We will provide feedback of course regarding the issues we encounter.

Thanks
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: WebGL SSL Issue

Postby Bax » 24 Apr 2015, 07:53

Email sent to both of you. Let us know how it goes.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 23 guests