New Api: "You have been disconnected; reason is: unknown"

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

User avatar
meanvel
Posts: 129
Joined: 19 Jan 2017, 14:06

New Api: "You have been disconnected; reason is: unknown"

Postby meanvel » 04 May 2017, 07:17

Get this error instantly whenever I try to connect with the new binary javascript API examples or my updated app... SmartFox version 2.13.0.

Nothing in the SmartFox server log shows any connection ever established in the first place.

No problems connecting with Flash, or the old JS Api with server version 2.12.5.
Image
Attachments
whatErr.png
(8.18 KiB) Not downloaded yet
User avatar
Bax
Site Admin
Posts: 4327
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: New Api: "You have been disconnected; reason is: unknown"

Postby Bax » 04 May 2017, 07:37

If the server doesn't log the connection attempt, then an error occurs on the client.
What is strange is that nothing is printed in the console.
What browser (and exact version) are you using?
Did you test using one of our examples too?
Paolo Bax
The SmartFoxServer Team
User avatar
Lapo
Site Admin
Posts: 19609
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: New Api: "You have been disconnected; reason is: unknown"

Postby Lapo » 04 May 2017, 07:38

Are you sure the "Enable WS/WSS" is active in your configuration? (AdminTool > Server Configurator > Web server)

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
meanvel
Posts: 129
Joined: 19 Jan 2017, 14:06

Re: New Api: "You have been disconnected; reason is: unknown"

Postby meanvel » 04 May 2017, 07:39

Yea, it's all the same... Firefox, Chrome. Ill check that option... One minute.

OS is Windows 7 64 Bit.
Image
Attachments
buddyErr.png
(16.2 KiB) Not downloaded yet
User avatar
meanvel
Posts: 129
Joined: 19 Jan 2017, 14:06

Re: New Api: "You have been disconnected; reason is: unknown"

Postby meanvel » 04 May 2017, 07:42

Ok, so the problem is... Your Web Server settings are very confusing now.

When you have "Activate" green, you assume it's live... And that WS/WSS is some optional parameter, lol...
User avatar
meanvel
Posts: 129
Joined: 19 Jan 2017, 14:06

Re: New Api: "You have been disconnected; reason is: unknown"

Postby meanvel » 04 May 2017, 07:54

Previously things were simple...
Image

Now, things are confusing. Two ways you can change this so that you don't end up with a steady stream of forum threads from people. Either Enable WS/WSS by default, or Rename it "Enable Web Sockets" and put it under "Activate".
Image
Attachments
notRealize.png
(12.79 KiB) Not downloaded yet
Simple.png
(10.68 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 19609
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: New Api: "You have been disconnected; reason is: unknown"

Postby Lapo » 04 May 2017, 08:01

Previously you had two separate tabs and four different ports to enable HTTP, HTTPS, WS and WSS.

Now all settings reside in one tab and you only use 2 ports: HTTP/WS (8080) and HTTPS/WSS (8443)

Please make sure to read the documentation here:
http://docs2x.smartfoxserver.com/Gettin ... ration-213

thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 2 guests