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

Websocket Error #14

Closed
raufis27 opened this issue Mar 28, 2020 · 1 comment
Closed

Websocket Error #14

raufis27 opened this issue Mar 28, 2020 · 1 comment

Comments

@raufis27
Copy link

As soon as I add websocket connection from NodeRed I get this:

[ERROR:2020-03-27 23:58:34,434] rhasspyserver_hermes: BadRequest(400)
Traceback (most recent call last):
File "/usr/lib/rhasspy-voltron/.venv/lib/python3.7/site-packages/quart/app.py", line 1940, in full_dispatch_websocket
result = await self.preprocess_websocket(websocket_context)
File "/usr/lib/rhasspy-voltron/.venv/lib/python3.7/site-packages/quart/app.py", line 1968, in preprocess_websocket
result = await function()
File "/usr/lib/rhasspy-voltron/.venv/lib/python3.7/site-packages/quart_cors/init.py", line 297, in _apply_websocket_cors
abort(400)
File "/usr/lib/rhasspy-voltron/.venv/lib/python3.7/site-packages/quart/exceptions.py", line 199, in abort
raise error
quart.exceptions.BadRequest: BadRequest(400)
[ERROR:2020-03-27 23:58:31,429] rhasspyserver_hermes: BadRequest(400)
Traceback (most recent call last):
File "/usr/lib/rhasspy-voltron/.venv/lib/python3.7/site-packages/quart/app.py", line 1940, in full_dispatch_websocket
result = await self.preprocess_websocket(websocket_context)
File "/usr/lib/rhasspy-voltron/.venv/lib/python3.7/site-packages/quart/app.py", line 1968, in preprocess_websocket
result = await function()
File "/usr/lib/rhasspy-voltron/.venv/lib/python3.7/site-packages/quart_cors/init.py", line 297, in _apply_websocket_cors
abort(400)

@synesthesiam
Copy link
Contributor

Should be fixed in latest version. Quart has decided for some reason that the HTTP Origin header is required now for websockets, which is against spec. Node-RED does not send this header, so a patch was required on the Rhasspy side to disable websocket origin checks.

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