I keep getting a [SFS - ERROR] [WebSocketLayer] Communication error: Abnormal disconnection.
Unity version - Unity 5.3.5p2
Unity 5 - Space War Example - WebGL Export
Re: Unity 5 - Space War Example - WebGL Export
We just re-tested with a setup very similar to yours (Unity 5.3.5f1 instead of p2) and we could not reproduce the issue. The game works as expected.
So it is not easy to spot what the problem is here.
Are you able to connect from the Unity Editor?
Did you try one of the other examples?
What if you open a terminal window and input telnet 127.0.0.1 8888? Are you able to connect?
So it is not easy to spot what the problem is here.
Are you able to connect from the Unity Editor?
Did you try one of the other examples?
What if you open a terminal window and input telnet 127.0.0.1 8888? Are you able to connect?
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Unity 5 - Space War Example - WebGL Export
It connects with no problem. The weird part is I had SpaceWar connecting a few days ago, and changed nothing. Now I'm getting abnormal disconnects.
I'll try another example, and see what happens.
I'll try another example, and see what happens.
Re: Unity 5 - Space War Example - WebGL Export
I tried testing the BuddyMessenger example.
This time I used the Unity that I use for my current project to make sure it wasn't that version of unity.
Unity version 5.3.4f1
This time I tested using the web player build in unity. It connected with no problem, so then I continued with a webgl test in unity.
I got the following message:
"Communication error: An exception has occurred while receiving a message. at WebSocketSharp.WebSocketFrame+<ReadAsync>c__AnonStorey1A.<>m__2E (System.Byte[] header) [0x00000] in <filename unknown>:0 \r\n at WebSocketSharp.Ext+<ReadBytesAsync>c__AnonStoreyD.<>m__1D (IAsyncResult ar) [0x00000] in <filename unknown>:0 ==> SocketError"
This time I used the Unity that I use for my current project to make sure it wasn't that version of unity.
Unity version 5.3.4f1
This time I tested using the web player build in unity. It connected with no problem, so then I continued with a webgl test in unity.
I got the following message:
"Communication error: An exception has occurred while receiving a message. at WebSocketSharp.WebSocketFrame+<ReadAsync>c__AnonStorey1A.<>m__2E (System.Byte[] header) [0x00000] in <filename unknown>:0 \r\n at WebSocketSharp.Ext+<ReadBytesAsync>c__AnonStoreyD.<>m__1D (IAsyncResult ar) [0x00000] in <filename unknown>:0 ==> SocketError"
Re: Unity 5 - Space War Example - WebGL Export
It gets better...
Jokes apart, can you make sure you are using the latest version of SmartFoxServer and the C# API?
Jokes apart, can you make sure you are using the latest version of SmartFoxServer and the C# API?
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Unity 5 - Space War Example - WebGL Export
I put in
in
to see if anything would be different when I exported a WebGL build and ran it.
I only got this:
Communication error: Abnormal disconnection. ==> SocketError
Code: Select all
Debug.LogError( (String)evt.Params["errorMessage"] );
in
Code: Select all
private void OnConnection(BaseEvent evt) {
if ((bool)evt.Params["success"]) {
// Login
sfs.Send(new Sfs2X.Requests.LoginRequest(nameInput.text));
} else {
Debug.LogError( (String)evt.Params["errorMessage"] );
// Remove SFS2X listeners and re-enable interface
reset();
// Show error message
errorText.text = "Connection failed; is the server running at all?";
}
}
to see if anything would be different when I exported a WebGL build and ran it.
I only got this:
Communication error: Abnormal disconnection. ==> SocketError
Re: Unity 5 - Space War Example - WebGL Export
Bax wrote:It gets better...
Jokes apart, can you make sure you are using the latest version of SmartFoxServer and the C# API?
I'm on Smartfox 2.11.0, so no I'm not on latest. The example api is not the latest but the one I'm using in my project is latest. I'll try to update everything and try again with the example.
Re: Unity 5 - Space War Example - WebGL Export
Updating to the latest SFS is not strictly necessary, while updating the API is highly recommended. Make sure you include the jslib file that comes with the SmartFox DLL.
Also I'd suggest to first test with the Connector example before anything else.
Also I'd suggest to first test with the Connector example before anything else.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Unity 5 - Space War Example - WebGL Export
Yea, after updating everything I still get the following:
Communication error: An exception has occurred while receiving a message. at WebSocketSharp.WebSocketFrame+<ReadAsync>c__AnonStorey1A.<>m__2E (System.Byte[] header) [0x00000] in <filename unknown>:0
at WebSocketSharp.Ext+<ReadBytesAsync>c__AnonStoreyD.<>m__1D (IAsyncResult ar) [0x00000] in <filename unknown>:0 ==> SocketError
UnityEngine.Debug:LogError(Object)
BuddyMessenger:OnConnection(BaseEvent) (at Assets/BuddyMessengerAssets/Scripts/BuddyMessenger.cs:328)
I'll switch to the connector example.
Communication error: An exception has occurred while receiving a message. at WebSocketSharp.WebSocketFrame+<ReadAsync>c__AnonStorey1A.<>m__2E (System.Byte[] header) [0x00000] in <filename unknown>:0
at WebSocketSharp.Ext+<ReadBytesAsync>c__AnonStoreyD.<>m__1D (IAsyncResult ar) [0x00000] in <filename unknown>:0 ==> SocketError
UnityEngine.Debug:LogError(Object)
BuddyMessenger:OnConnection(BaseEvent) (at Assets/BuddyMessengerAssets/Scripts/BuddyMessenger.cs:328)
I'll switch to the connector example.
Re: Unity 5 - Space War Example - WebGL Export
Same on the Connector project...
fun x_X
The only thing I can think of trying now is a clean install of the server.
fun x_X
The only thing I can think of trying now is a clean install of the server.
Re: Unity 5 - Space War Example - WebGL Export
Installed a clean server and enabled Websockets, and still the same error.
Hmmm... time for some coffee and a thinking session X_X.
Hmmm... time for some coffee and a thinking session X_X.
Re: Unity 5 - Space War Example - WebGL Export
.......................................................................................
............................
............
.......
I knew that Kaspersky update was fishy...
sigh. everything working again.
............................
............
.......
I knew that Kaspersky update was fishy...
sigh. everything working again.
Re: Unity 5 - Space War Example - WebGL Export
Glad you found the issue!
(and also glad it's not our fault )
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Unity 5 - Space War Example - WebGL Export
I try to scare you guys every once in a while .
Thanks for taking a look though.
Thanks for taking a look though.
Who is online
Users browsing this forum: No registered users and 83 guests