TOKEN_CMD_INCORRECT_COMMAND

0 votes
asked by

I'm getting the error: "IN: { "TOKEN_TYPE": "TOKEN_TYPE_SEND",    "TOKEN_CMD":"TOKEN_CMD_INCORRECT_COMMAND", "TOKEN_PARAM_EXCEPTION_CAUSE": "(1): expected object or array" } "

When I send the below request to the webscoket:

var message = '{"TOKEN_TYPE":"TOKEN_TYPE_REQUEST", "TOKEN_CMD":"TOKEN_CMD_SIGNATURE_START", "TOKEN_PARAM_TEXT_LAYOUT": {"TOKEN_PARAM_LAYOUT_ID": "0", "TOKEN_PARAM_TEXT_BLOCKS": [{"TOKEN_PARAM_TEXT":"Text1", "TOKEN_PARAM_WIDTH": "100", "TOKEN_PARAM_HEIGHT": "10", "TOKEN_PARAM_MAX_FONT_SIZE": "60", "TOKEN_PARAM_CONSTANT": "TRUE"}, {"TOKEN_PARAM_WIDTH": "100", "TOKEN_PARAM_HEIGHT": "10"}, {"TOKEN_PARAM_TEXT":"Text2", "TOKEN_PARAM_WIDTH": "100", "TOKEN_PARAM_HEIGHT": "10", "TOKEN_PARAM_FONT_SIZE_ID" : "0"},  {"TOKEN_PARAM_TEXT":"Text3", "TOKEN_PARAM_WIDTH": "100", "TOKEN_PARAM_HEIGHT": "10", "TOKEN_PARAM_FONT_SIZE_ID" : "0"},  {"TOKEN_PARAM_TEXT":"Text4", "TOKEN_PARAM_WIDTH": "100", "TOKEN_PARAM_HEIGHT": "10", "TOKEN_PARAM_FONT_SIZE_ID" : "0"}, {"TOKEN_PARAM_TEXT":"Text5", "TOKEN_PARAM_WIDTH": "100", "TOKEN_PARAM_HEIGHT": "10", "TOKEN_PARAM_FONT_SIZE_ID" : "0"}, {"TOKEN_PARAM_TEXT":"Text6", "TOKEN_PARAM_WIDTH": "100", "TOKEN_PARAM_HEIGHT": "10", "TOKEN_PARAM_FONT_SIZE_ID" : "0"}, {"TOKEN_PARAM_TEXT":"Text7", "TOKEN_PARAM_WIDTH": "100", "TOKEN_PARAM_HEIGHT": "10", "TOKEN_PARAM_FONT_SIZE_ID" : "0"}, {"TOKEN_PARAM_TEXT":"Text8", "TOKEN_PARAM_WIDTH": "100", "TOKEN_PARAM_HEIGHT": "10", "TOKEN_PARAM_FONT_SIZE_ID" : "0"}]}}'

 websocket.send(message)

Is there any fix to this issue?

related to an answer for: TOKEN_CMD_SIGNATURE_START not working

1 Answer

0 votes
No avatar answered by (120k points)

It looks like there is an error in the JSON format of the request being sent to the websocket server. The server is expecting an object or array but it is not receiving that. Check the format of the request and see if there are any syntax errors.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...