Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error #50

Open
bifot opened this issue Jun 17, 2019 · 2 comments
Open

Parsing error #50

bifot opened this issue Jun 17, 2019 · 2 comments

Comments

@bifot
Copy link

bifot commented Jun 17, 2019

When I'm sending a lot of messages to the server, some messages fail, other messages are ok.

{ success: false,
  error:
   'Error: Invalid content length supplied (\\",\\"payload\\":{\\"name\\":\\"StatTrak™ USP-S | Cortex (Factory New)\\",\\"patternIndex\\":230}},\\"meta\\":{\\"id\\":\\"32826924962616033\\",\\"host\\":\\"127.0.0.1\\",\\"port\\":51906}}16"}316) in: ' }
{ success: false,
  error:
   'Error: Invalid content length supplied (ective (Minimal Wear)\\",\\"patternIndex\\":954}},\\"meta\\":{\\"id\\":\\"5835899799671969\\",\\"host\\":\\"127.0.0.1\\",\\"port\\":51906}}17"}318) in: ' }
@bifot
Copy link
Author

bifot commented Jun 17, 2019

Sometimes can't parse JSON.

{ success: false,
  error:
   'Error: Could not parse JSON: Unexpected number in JSON at position 320\nRequest data: {"success":false,"error":"Error: Could not parse JSON: Unexpected number in JSON at position 178\\nRequest data: {\\"data\\":{\\"action\\":\\"check\\",\\"payload\\":{\\"name\\":\\"StatTrak™ M4A4 | Royal Paladin (Factory New)\\",\\"patternIndex\\":959}},\\"meta\\":{\\"id\\":\\"32598132724562956\\",\\"host\\":\\"127.0.0.1\\",\\"port\\":51906}}18"}32' }

@foi
Copy link
Contributor

foi commented Jul 13, 2019

@bifot what a delimeter-symbol have you use?

By default it is # - and if this occured in body messages - parsing is broken.

You can pass custom delimeter like this:

var serverSocket = new JsonSocket(socket, { delimeter: "⁂"});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants