Everytime I login into the zone, join in a room, wait for a while, the error comes out.
## SocketDataError: [ProgressEvent type="socketData" bubbles=false cancelable=false eventPhase=2 bytesLoaded=3 bytesTotal=0]
I've no idea where it comes from, I don't have large data to transfer. I can neither send message nor receive, seems like I'm disconnected. But I check the Zone Monitor module, it shows I am still in the room.
SocketDataError problem!
Hi.
Does that happen every time you try to login? If so, can you provide us the code you're using for doing the login (specially the server-side part)?
Does that happen every time you try to login? If so, can you provide us the code you're using for doing the login (specially the server-side part)?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Yes, almost everytime. Here is server-side code, I just did a simple password validation.
Here is the client-side:
Actually, At first few minutes, I can send and receive message normally. And then I found that I can only send message out, but I can't receive it myself! And I can't not receive any message when this happend. others in the room can see my message.
Code: Select all
public class LoginEventHandler extends BaseServerEventHandler{
private static final String seed = "xxxx";
@Override
public void handleServerEvent(ISFSEvent event) throws SFSException{
if(event.getType() == SFSEventType.USER_LOGIN){
SFSObject params = (SFSObject)event.getParameter(SFSEventParam.LOGIN_IN_DATA);
long hnumber = params.getLong("hnumber");
String user_name = params.getUtfString("userName");
String user_id = (String)event.getParameter(SFSEventParam.LOGIN_NAME);
String password = (String) event.getParameter(SFSEventParam.LOGIN_PASSWORD);
Session user_session = (Session)event.getParameter(SFSEventParam.SESSION);
if(!getApi().checkSecurePassword(user_session, pwd_digest, password)){
SFSErrorData errData = new SFSErrorData(SFSErrorCode.LOGIN_BAD_PASSWORD);
throw new SFSLoginException("invalid user!", errData);
}
}
}
}
Here is the client-side:
Code: Select all
public function login(iAuthenticationSystem:IAuthenticationSystem):void{
var as_Login:AS_Login = (iAuthenticationSystem as AS_Login);
(this.m_login = as_Login);
(this.m_user = as_Login.User);
var password:String = as_Login.Password;
var params:SFSObject = as_Login.Params;
var loginRequest:LoginRequest = new LoginRequest(this.m_user.Id, password, this.zone, params);
try {
this.sfs.send(loginRequest);
(this._isLoggingOut = false);
} catch(e) {
};
}
Actually, At first few minutes, I can send and receive message normally. And then I found that I can only send message out, but I can't receive it myself! And I can't not receive any message when this happend. others in the room can see my message.
Re: SocketDataError problem!
Hi,
You check the user's credentials against a database, correct? If so, please make sure that you always close the database connection after you get the password, even when you throw the LoginException.
You check the user's credentials against a database, correct? If so, please make sure that you always close the database connection after you get the password, even when you throw the LoginException.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: SocketDataError problem!
We also experienced this problem, but now we couldn't investigate what was going on as we could no longer reproduce it. The symptoms were very similar:
1. Login to the game
2. Idle for 2-3 minutes
3. Everyone else in the room stops moving / talking
4. Console reports SocketDataError:
## SocketDataError: [ProgressEvent type="socketData" bubbles=false cancelable=false eventPhase=2 bytesLoaded=57 bytesTotal=0]
SocketClient: Socket error: [SFSEvent type="socketError" bubbles=false cancelable=false eventPhase=2 params=[object Object]]
[SFS - INFO] Data Read: Binary Size: 60
80 00 39 12 00 03 00 01 61 03 00 0C 00 01 63 02 ..9.....a.....c.
00 00 01 70 12 00 02 00 01 75 04 00 00 41 CC 00 ...p.....u...A..
02 76 6C 11 00 01 11 00 03 08 00 0B 73 71 75 61 .vl.........xxxxxxxx.....
At a glance it seemed like it was caused possibly by network fluctuation, but again because it only happened that time we can't tell for sure. I'll keep an eye on it and post an update if there's anything.
I'm keen to hear if anyone else has experienced this as well.
1. Login to the game
2. Idle for 2-3 minutes
3. Everyone else in the room stops moving / talking
4. Console reports SocketDataError:
## SocketDataError: [ProgressEvent type="socketData" bubbles=false cancelable=false eventPhase=2 bytesLoaded=57 bytesTotal=0]
SocketClient: Socket error: [SFSEvent type="socketError" bubbles=false cancelable=false eventPhase=2 params=[object Object]]
[SFS - INFO] Data Read: Binary Size: 60
80 00 39 12 00 03 00 01 61 03 00 0C 00 01 63 02 ..9.....a.....c.
00 00 01 70 12 00 02 00 01 75 04 00 00 41 CC 00 ...p.....u...A..
02 76 6C 11 00 01 11 00 03 08 00 0B 73 71 75 61 .vl.........xxxxxxxx.....
At a glance it seemed like it was caused possibly by network fluctuation, but again because it only happened that time we can't tell for sure. I'll keep an eye on it and post an update if there's anything.
I'm keen to hear if anyone else has experienced this as well.
Re: SocketDataError problem!
@copet80
Are you using the latest 2.2.0? If not please update
Are you using the latest 2.2.0? If not please update
Re: SocketDataError problem!
Thanks. We're in the process of updating to 2.2.0. From the release notes it seems like the following line is related to this issue?
[FIX] Improved buffering strategy for highly fragmented traffic.
If so, do you mind telling us any information about the issue and what was fixed so that we can perform some tests and observe if the issue has been solved for us after patching it on our production server.
[FIX] Improved buffering strategy for highly fragmented traffic.
If so, do you mind telling us any information about the issue and what was fixed so that we can perform some tests and observe if the issue has been solved for us after patching it on our production server.
Re: SocketDataError problem!
I am sorry, no these problems are not reproducible at will. All I can say is that all people who previously reported issues like this confirmed that the issue no longer appeared.
We were able to see the problem randomly appear in each test prior to the patch, after it the problem is gone.
We were able to see the problem randomly appear in each test prior to the patch, after it the problem is gone.
Who is online
Users browsing this forum: No registered users and 103 guests