Request rejected: No Controller ID in request!

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

Posts: 1
Joined: 31 Jul 2017, 05:09

Request rejected: No Controller ID in request!

Postby nitrid » 31 Jul 2017, 05:26

hi guys

I want to send data over 400 KB. But the process is interrupted.

Code: Select all

Error handling data: Request rejected: No Controller ID in request!   at Sfs2X.Core.SFSProtocolCodec.DispatchRequest (ISFSObject requestObject) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.SFSProtocolCodec.OnPacketRead (Sfs2X.Util.ByteArray packet) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.SFSIOHandler.HandlePacketData (Sfs2X.Util.ByteArray data) [0x00000] in <filename unknown>:0
NLabTool:OnErrorMessage(BaseEvent) (at Assets/NLab/NLabTool/Code/NLabTool.cs:386)

Request rejected: No Controller ID in request ???

Server side code :

Code: Select all

ISFSArray TmpRes = GetRivalRaceData(TmpUserId);
if(TmpRes != null)
        TmpRivalName = TmpRes.getSFSObject(0).getUtfString("UserName");
        TmpRivalRaceData = TmpRes.getSFSObject(0).getUtfString("Data");                        
SFSArray Tmp = new SFSArray();
for(String item:TmpRivalRaceData.split("|"))
ISFSObject sfso = new SFSObject();         
sfso.putSFSArray("RaceData", Tmp);

could you help. thanks
User avatar
Site Admin
Posts: 21521
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Request rejected: No Controller ID in request!

Postby Lapo » 31 Jul 2017, 07:03

the error indicates a decoding issue on the client side.

Can you clarify what SFS2X version are you working with, and the version of the client API?
Also, since you posted under the Android section I take it that you're working in Unity and building for Android, is this correct?
Does the problem occur in both the Editor and on the test device?

Finally, keep in mind that there are limits to the size of array types in an SFSObject (e.g. SFSArray, UtfStringArray etc...): they can hold a max of 32767 (2^15) elements.

If you need to send larger data structure my suggestion is to serialize your data to binary and then wrap it in an SFSObject via PutByteArray(). ByteArray supports 2^31 items (2GB+ of data).
E.g. the serialization could be done via JSON and the resulting string converted to Byte[]

...addicted to flash games

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 2 guests