-
-
Notifications
You must be signed in to change notification settings - Fork 24
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
"Invalid frame header" #77
Comments
When I try to connect through WSS instead of WS:
|
If you are going to use WSS you have to configure TLS in your server, you can't just send encrypted traffic to a regular server. For the invalid frame header error, I suggest you retest using Gunicorn, which is the supported production web server. You are using Werkzeug which is not fully compatible with WebSocket. Some Werkzeug versions have minor WebSocket issues at disconnect time. |
Then by any chance, do you know how to configure TLS in Windows? |
Also I don't really mind whether do I want WS or WSS, I just want a WebSocket port in my Flask server. That's all I'd want. |
Gunicorn does not run on Windows, unfortunately. Can you use WSL? That would allow you to run the UNIX version of Gunicorn on your Windows machine. TLS is configured on your web server. For Gunicorn, you pass command line options to set up your certificate and key files. |
Looks like my crappy code can't run locally. Too bad. 😔 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hello there. I've ran into a large problem with (probably) my first time use of
Flask-Sock
. Basically, when client or server closes the connection, the browser (client) gets a "Invalid frame header" error and the console says that the WS connection was an HTTP request, something like this:To replicate my problem, this code should do the "trick":
Browser code (ran in Chrome DevTools)
I've tried doing lots of things to debug it, but nothing fought out the error. Can you help?
The text was updated successfully, but these errors were encountered: