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

werkzeug.routing.exceptions.WebsocketMismatch: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand. #14

Open
windowshopr opened this issue Nov 19, 2022 · 2 comments

Comments

@windowshopr
Copy link

Python 3.11, Flask==2.2.2, Windows 10

After firing up the server and joining a room, get this error in the server log:

127.0.0.1 - - [19/Nov/2022 03:04:13] "GET /poker/texas-holdem HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\serving.py", line 335, in run_wsgi
    execute(self.server.app)
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\serving.py", line 322, in execute
    application_iter = app(environ, start_response)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 2548, in __call__
    return self.wsgi_app(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask_sockets.py", line 40, in __call__
    handler, values = adapter.match()
                      ^^^^^^^^^^^^^^^
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\routing\map.py", line 622, in match
    raise WebsocketMismatch() from None
werkzeug.routing.exceptions.WebsocketMismatch: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
@orfey7
Copy link

orfey7 commented Mar 8, 2023

Python 3.11, Flask==2.2.2, Windows 10

After firing up the server and joining a room, get this error in the server log:

127.0.0.1 - - [19/Nov/2022 03:04:13] "GET /poker/texas-holdem HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\serving.py", line 335, in run_wsgi
    execute(self.server.app)
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\serving.py", line 322, in execute
    application_iter = app(environ, start_response)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 2548, in __call__
    return self.wsgi_app(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask_sockets.py", line 40, in __call__
    handler, values = adapter.match()
                      ^^^^^^^^^^^^^^^
  File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\routing\map.py", line 622, in match
    raise WebsocketMismatch() from None
werkzeug.routing.exceptions.WebsocketMismatch: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

I faced the same problem(
Only the table and the nickname that you entered appear on the page, without the ability to play
Did you solve it?

@Nacriema
Copy link

Nacriema commented Jan 20, 2024

Hi,

I faced the same problem. Please change the content inside requirements.txt to:

Flask-Sockets==0.2.1
gunicorn==20.0.4
redis==3.5.3
Flask==1.1.4
Werkzeug==1.0.1
markupsafe==2.0.1

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

3 participants