Flask-SocketIO: WebSocket is not available, what this mean ?
I have issue with message bellow:
WARNING in __init__: Flask-SocketIO is Running under Werkzeug, WebSocket is not available.
Every running my server, always showing error. Need help
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (5 by maintainers)
As I said above, reconfigure your vsproject to run the script instead of calling
flask run. Then add the following at the bottom of the script:Yes. I added a run.py outside the flask app. And I use socketio.run(app) inside the file.
When I want to debug the flask app running on eventlet, I just added codes below to the launch.json:
Everything works well.
@prakasa1904 @desmondddd I am having the same issue. Is there an example repo or a little bit more guidance on running socket.io outside of the flask app?
@desmondddd this is correct. The
flask runcommand cannot be used to run on the more advanced webservers anymore. This command was broken and caused problems for some people, so I’m not supporting that way of starting the server anymore, except when using the Flask dev server, which does not have WebSocket. Usesocketio.run(app)to run your eventlet or gevent web server.