Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • WebSocket API /
avatar image
Question by james_molohon · Aug 16, 2018 at 08:57 AM · websockets api

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.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

6 Replies

  • Sort: 
avatar image
Best Answer
Answer by james_molohon · Jan 16, 2020 at 01:46 PM

Finally discovered the source of the issue - I was using Websocket4net library https://github.com/kerryjiang/WebSocket4Net, and it's default configuration is to send a ping with timestamp every 60 seconds. If you are using this library, set EnableAutoSendPing to false.

Comment
nick.zincone.1

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Gurpreet · Aug 16, 2018 at 09:07 AM

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.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by jim.carroll · Aug 16, 2018 at 09:55 AM

@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.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by james_molohon · Aug 17, 2018 at 08:16 AM

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.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by jim.carroll · Aug 17, 2018 at 10:14 AM

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?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by james_molohon · Aug 17, 2018 at 12:33 PM

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.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

Using EZD with Websockets

Getting NAK posting via TSA using websocket api "UpdateMsg has no RSSL_UPMF_HAS_MSG_KEY flag"

Elektron Websocket

Websocket API batch sample for EDP

Handshake status 500 handshakefailed when running the markety_price.py example code.

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges