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

Runtime errors due to not using a gevent-websocket server #253

Open
gridhead opened this issue Mar 7, 2022 · 0 comments
Open

Runtime errors due to not using a gevent-websocket server #253

gridhead opened this issue Mar 7, 2022 · 0 comments
Labels
hacktoberfest Contribute here to get a free tee T: bug Something isn't working

Comments

@gridhead
Copy link
Member

gridhead commented Mar 7, 2022

Here's a log snapshot.

image

And here's a snippet for the copy-pasta convenience.

2022-03-07 08:27:58,070 - root - INFO - trigger_on_connect: client 1
2022-03-07 08:27:58,070 - werkzeug - INFO - 127.0.0.1 - - [07/Mar/2022 08:27:58] "POST /socket.io/?EIO=4&transport=polling&t=NzYJ-Sj&sid=b3TxuK8-F6M7KwDzAAAA HTTP/1.1" 200 -
2022-03-07 08:27:58,071 - werkzeug - INFO - 127.0.0.1 - - [07/Mar/2022 08:27:58] "GET /socket.io/?EIO=4&transport=polling&t=NzYJ-Sk&sid=b3TxuK8-F6M7KwDzAAAA HTTP/1.1" 200 -
2022-03-07 08:27:58,072 - werkzeug - INFO - 127.0.0.1 - - [07/Mar/2022 08:27:58] "GET /socket.io/?EIO=4&transport=websocket&sid=b3TxuK8-F6M7KwDzAAAA HTTP/1.1" 500 -
2022-03-07 08:27:58,074 - werkzeug - ERROR - Error on request:
Traceback (most recent call last):
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/werkzeug/serving.py", line 324, in run_wsgi
    execute(self.server.app)
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/werkzeug/serving.py", line 313, in execute
    application_iter = app(environ, start_response)
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/flask/app.py", line 2091, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/Flask_SocketIO-5.1.1-py3.10.egg/flask_socketio/__init__.py", line 43, in __call__
    return super(_SocketIOMiddleware, self).__call__(environ,
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/engineio/middleware.py", line 63, in __call__
    return self.engineio_app.handle_request(environ, start_response)
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/socketio/server.py", line 597, in handle_request
    return self.eio.handle_request(environ, start_response)
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/engineio/server.py", line 411, in handle_request
    packets = socket.handle_get_request(
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/engineio/socket.py", line 103, in handle_get_request
    return getattr(self, '_upgrade_' + transport)(environ,
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/engineio/socket.py", line 158, in _upgrade_websocket
    return ws(environ, start_response)
  File "/home/t0xic0der/Projects/mote/venv/lib/python3.10/site-packages/engineio/async_drivers/gevent.py", line 35, in __call__
    raise RuntimeError('You need to use the gevent-websocket server. '
RuntimeError: You need to use the gevent-websocket server. See the Deployment section of the documentation for more information.

werkzeug which happens to be the default WSGI for flask must be replaced by a gevent compatible WSGI.

@gridhead gridhead added the T: bug Something isn't working label Mar 7, 2022
@gridhead gridhead added the hacktoberfest Contribute here to get a free tee label Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Contribute here to get a free tee T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant