Page 1 of 1

Request rejected: No Controller ID in request!

Posted: 31 Jul 2017, 05:26
by nitrid
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

Re: Request rejected: No Controller ID in request!

Posted: 31 Jul 2017, 07:03
by Lapo
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[]