Facebook WebGl Connection Error in Websocket

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

unity.webmyne
Posts: 24
Joined: 13 Feb 2017, 09:49

Facebook WebGl Connection Error in Websocket

Postby unity.webmyne » 10 Aug 2017, 10:31

Hello,

We have created WebGL Build for Facebook of our game using Smartfox2x and we are using
sfs = new SmartFox(UseWebSocket.WS); at client side
WS Port as specified at smartfox server admin panel
and WS/WSS is enabled at smartfox server admin panel.

It is running fine in browser before deployed but after hosted to facebook, its shows following Error:

blob:https://apps-117849505498538.apps.fbsbx.com/775e0de5-b35d-4861-8c3d-1288076d9df7:1 Mixed Content: The page at 'https://apps.facebook.com/117849505498538' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://env-9805156.njs.jelastic.vps-host.net:8080/websocket'. This request has been blocked; this endpoint must be available over WSS.

After that we have tried to use :
sfs = new SmartFox(UseWebSocket.WSS); at client side instead of UseWebSocket.WS
and used WSS port specified at smartfox2X admin panel, but it is not able to connect in normal browser.

We have checked in chrome and Firefox browser.

Please help ASAP as we have stuck.

Kind Regards,
Romin
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Facebook WebGl Connection Error in Websocket

Postby Lapo » 10 Aug 2017, 11:00

Hi,
in order to use WSS you will need a valid SSL certificate installed in the server.
Have you deployed it?

For more on this please read here:
http://docs2x.smartfoxserver.com/Gettin ... yptography

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
unity.webmyne
Posts: 24
Joined: 13 Feb 2017, 09:49

Re: Facebook WebGl Connection Error in Websocket

Postby unity.webmyne » 10 Aug 2017, 12:26

hi..

No, We haven't installed SSL Certificate to our SmartFox2X Server. If I assign right now, will it affect to my existing live mobile versions of Android and IOS?

Kind Regards,
Romin
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Facebook WebGl Connection Error in Websocket

Postby Lapo » 10 Aug 2017, 13:12

No, absolutely not.
The certificate is only used for secure connections.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
unity.webmyne
Posts: 24
Joined: 13 Feb 2017, 09:49

Re: Facebook WebGl Connection Error in Websocket

Postby unity.webmyne » 10 Aug 2017, 13:18

will it change my connection port?

Thanks,
Romin
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Facebook WebGl Connection Error in Websocket

Postby Lapo » 10 Aug 2017, 14:23

Yes, there are two different ports in use for WS and WSS.
By default they are 8080 and 8443, if you're using the latest version, 2.13.

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
unity.webmyne
Posts: 24
Joined: 13 Feb 2017, 09:49

Re: Facebook WebGl Connection Error in Websocket

Postby unity.webmyne » 11 Aug 2017, 04:47

hi..

We have already live our game on android platform,if I install SSL Certificate to Smartfox2x admin just to support our Facebook development build will it affect to my android live game? Do I need to change the port to our android version also?

Thanks,
Romin
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Facebook WebGl Connection Error in Websocket

Postby Lapo » 11 Aug 2017, 06:59

As I said earlier no, it won't affect other clients.
Lapo

--

gotoAndPlay()

...addicted to flash games
unity.webmyne
Posts: 24
Joined: 13 Feb 2017, 09:49

Re: Facebook WebGl Connection Error in Websocket

Postby unity.webmyne » 11 Aug 2017, 08:26

Ok Great !

Thanks
Romin

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 58 guests