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

Problems with update to websockets 10.0 #1060

Closed
oliver-zehentleitner opened this issue Oct 2, 2021 · 5 comments
Closed

Problems with update to websockets 10.0 #1060

oliver-zehentleitner opened this issue Oct 2, 2021 · 5 comments

Comments

@oliver-zehentleitner
Copy link
Contributor

Hello Augustin!

My library unicorn-binance-websocket-api connects to some endpoints of Binance.com and up to websockets 9.1 everything worked fine.

When we use websockets 10.0 all endpoints work except one.(To give the endpoint a name: binance.com-futures) The connection is established and confirmed, but no data comes over the socket connection. However, PING/PONG are received.

The python-binance library "suffers" from the same phenomenon: sammchardy/python-binance#1023

Here I have uploaded the logfiles for comparison, but the data does not help. I don't see any hint: LUCIT-Systems-and-Development/unicorn-binance-websocket-api#199 (comment)

Can you help me and explain what has changed in version 10.0 and could lead to such behavior? And what tests can we do to get better clues?

Thanks a lot,
Oliver

@aaugustin
Copy link
Member

This looks a lot like #1050 (comment) or #1046 (comment).

Basically, cryptocurrency exchanges support for compression settings appears to be buggy. They dislike an optimization I made in 10.0 to reduce memory usage. In the best case, they infringe the RFC in the opening handshake and websockets crashes loudly. In the worst case, they silently fail to send messages, which is utterly impossible to debug from the outside.

@oliver-zehentleitner
Copy link
Contributor Author

Thank you very much! With that infos i can fix it!

@aaugustin
Copy link
Member

I know the easy path is to workaround by disabling compression; that said it would be really useful if you were able to report this to Binance so they have a chance to fix it.

It's super easy to reproduce with websockets -- literally 5 lines of code, including setting logging to DEBUG. Maybe that'll help them fix their WebSocket implementation, or at least report the bug to the maintainers of the server they're using.

@oliver-zehentleitner
Copy link
Contributor Author

you're right, i've been trying to contact them through different ways since yesterday! thank you very much!

@aaugustin
Copy link
Member

Complete explanation here: #1065 (comment)

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