LoginRequest params character problem

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

aliko
Posts: 115
Joined: 09 Mar 2013, 16:26

LoginRequest params character problem

Postby aliko » 16 Jun 2017, 12:21

Hello,

When I try to login with javascript api (new version, server updated to 2.13), I'm gettin below error.
Can you help me please?
It is normal without Turkish chars.

uName = "mehmet";
userName = "Mehmet Çalışkan"; //There is Turkish char...
authProvider=1;

Code: Select all

var params = new SFS2X.SFSObject();
params.putUtfString("name", userName);
        params.putInt("ap", authProvider);
        trace(params);
        sfs.send(new SFS2X.LoginRequest(uName, "a", params));




Code: Select all

16 Jun 2017 | 15:27:02,592 | WARN  | SFSWorker:Sys:2 | websocket.jetty.WebSocketBinaryProtocolCodec |     | java.lang.IllegalStateException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.IllegalStateException
Message: Invalid SFSObject key length. Found = 27392
Description: Serialization error in incoming websocket packet.
From: { Id: 1774, Type: WEBSOCKET, Logged: No, IP: 76.31.90.228:56109 }
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.decodeSFSObject(DefaultSFSDataSerializer.java:205)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.decodeObject(DefaultSFSDataSerializer.java:743)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.decodeSFSObject(DefaultSFSDataSerializer.java:212)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.decodeObject(DefaultSFSDataSerializer.java:743)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.decodeSFSObject(DefaultSFSDataSerializer.java:212)
com.smartfoxserver.v2.protocol.serialization.DefaultSFSDataSerializer.binary2object(DefaultSFSDataSerializer.java:170)
com.smartfoxserver.v2.entities.data.SFSObject.newFromBinaryData(SFSObject.java:149)
com.smartfoxserver.bitswarm.websocket.jetty.WebSocketBinaryProtocolCodec.onPacketRead(WebSocketBinaryProtocolCodec.java:58)
sfs2x.websocket.SFS2XWSService$WSIOExecutor.run(SFS2XWSService.java:102)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
User avatar
Bax
Site Admin
Posts: 4332
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: LoginRequest params character problem

Postby Bax » 16 Jun 2017, 14:19

Thank you for reporting the issue.
We have been able to reproduce it and we are now investigating how to fix it.
We'll keep you informed here.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4332
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: LoginRequest params character problem

Postby Bax » 19 Jun 2017, 09:05

Issue fixed.
Please download the new API version (1.7.5).
Thank you for reporting.
Paolo Bax
The SmartFoxServer Team
aliko
Posts: 115
Joined: 09 Mar 2013, 16:26

Re: LoginRequest params character problem

Postby aliko » 19 Jun 2017, 13:35

Thank you very much, I updated and problem fixed.

Best Regards

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 3 guests