Why am I receiving a "JSON parser error" message from Elektron WebSocket?

I am receiving this error message about once per minute:

[{"ID":0,"Type":"Error","Text":"JSON parser error: -3","Debug":{"File":"Converter/jsonToRwfBase.C","Line":462,"Message":"08/16/2018 12:42:20"}}]

The only other messages I'm sending around this time is {"Type":"Ping"}, for which I receive a Pong,

or my response to the servers Ping, for which i send {"Type":"Pong"}.

Thanks in advance for any helpful ideas.

Best Answer

Answers

  • Can you please provide additional details like RIC and language and particular example used when you get this error.

    If connecting to a local TREP, we will need the ADS version as well.

  • @james_molohon,
    Ensure you are sending a full and valid message. For example, a message like:

    {"Type":"Ping" 

    would produce this error since the closing bracket is missing.

  • We are running version 2.6 on ADS. Our language is C#, and is similar to the sample code. Sorry ,but I am unable to share my code. I'm logging all messages sent and received. I see expected responses for the messages I send, but not sure why I continue to see this parser error with ID:0 at a one minute interval on every application that we use to connect to the websocket.

  • I see that the error's Message field shows that the ADS appears to have received a frame containing only a date & time:

    08/16/2018 12:42:20 

    Looks like that was the current date & time. Is your application sending that over the WebSocket?

  • I have a method that logs every message before sending over the websocket, and I don't see anything logged that resembles just the date and time. I have observed that we only receive the parser error message during periods when we are sending ping messages to keep the connection open, and not when we are fetching prices. But still I see the pings and pongs as noted in the original post, and the expected response from the websocket.