-
Notifications
You must be signed in to change notification settings - Fork 85
Invalid payload when array size greater than 255 #54
Comments
Any error log? |
In my inspect, the root cause is here CHRLINE/CHRLINE/services/TalkService.py Line 462 in c628de7
I'm only know in spec it is int32 BE. |
Apparently this is early code and it's not well supported. Try use |
full code: def getContacts(self, mid: str):
METHOD_NAME = "getContacts"
params = [[15, 2, [11, mids]]]
sqrd = self.generateDummyProtocol(METHOD_NAME, params, 3)
return self.postPackDataAndGetUnpackRespData(
self.LINE_NORMAL_ENDPOINT, sqrd, readWith=f"TalkService.{METHOD_NAME}"
) but how? sqrd = [
128, 1,0,1, 0,0, 0,11,103,101,116, 67,111,110,116,97,99,116,115, 0,0,0,0,15,0,2,11,0,0,0, len(mids)
# (PROTO)(SEQ)( CALL NAME )( PARAMS )
# Type 15, Fid 2, String(Type 11) list
] first byte indicates the protocol type (Binary), which limits the endpoints it can request (/S3). In order to get better support, use generateDummyProtocol() to generate the formats of various protocols, which also simplifies the writing of parameters (REF DummyProtocol.md migrating old code to new code is not difficult, but I didn't do it because it was too time-consuming. |
Ok, thanks |
Maybe all
len( xxx )
are same.P.S. This mainly occur on
getContacts
in large group.The text was updated successfully, but these errors were encountered: