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

JSON message Syntax Error #2

Open
jdgriffith opened this issue Nov 20, 2023 · 4 comments
Open

JSON message Syntax Error #2

jdgriffith opened this issue Nov 20, 2023 · 4 comments

Comments

@jdgriffith
Copy link

I'm encountering an issue where it appears there is a memory address leak or some other binary thing happening with the message and it's mixed with the normal UTF8 part of the message.

This appears to come from cli.nextMessage() initially as you can see where I output the message to the screen.

Screenshot 2023-11-20 at 10 11 01 AM

Let me know if you have any thoughts or need more information.

@jdgriffith
Copy link
Author

I wonder if this is related to some weirdness that happens from @memcpy.

So essentially could be happening at one of these two lines:

https://github.com/ianic/websocket.zig/blob/main/src/stream.zig#L146
https://github.com/ianic/websocket.zig/blob/main/src/stream.zig#L159

@ianic
Copy link
Owner

ianic commented Nov 21, 2023

Those two lines are only invoked if message is fragmented. But that is also deeply tested with autobahn.
Do you know; are your messages fragmented, are they compressed.
Is there a public url on which I can connect to get this error?

@jdgriffith
Copy link
Author

I am connecting to polygon.io and their stocks websocket. I only experience this error during a high volume of messages during intraday trading, so I suspect tests may not catch it.

I'm not sure the best way for you to test without me giving credentials. I could maybe share my screen on a call?

@jdgriffith
Copy link
Author

I realized I didn't fully answer your question(s). The messages are fragmented but I'm not sure about them being compressed.

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