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 Version Incompatible with Rasa 3.0 #11084
Comments
Thanks for the issue, @kalkbrennerei will get back to you about it soon! You may find help in the docs and the forum, too 🤗 |
@arabellastrange Thanks for flagging this issue - It's a bit difficult to track which depedency versions you're using with which rasa version from the issue content, I would therefore ask you to create a fresh new virtual environment and install the latest rasa version
Let me know if this set-up fails for you. |
Hello, Thanks for the reply. I created a fresh venv with rasa 3.1 as requested: My entire environment is attached as a txt file here: |
@arabellastrange I've passed this reported bug to be triaged accordingly, my preliminary findings were:
|
Hi @arabellastrange, do you encounter the issue when connecting an actual chat widget ? I tried connecting the rasa chat widget (from the hosted storybook) to a locally running rasa 3.2.5 instance and it worked just fine: But indeed, Which, from the python-engineio source code is expected: if sid is None and query.get('EIO') != ['4']:
self._log_error_once(
'The client is using an unsupported version of the Socket.IO '
'or Engine.IO protocols', 'bad-version'
)
return await self._make_response(self._bad_request(
'The client is using an unsupported version of the Socket.IO '
'or Engine.IO protocols'
), environ) Adding the required query param (which is sent by the I believe this param to be the I'll be closing for now, but feel free to re-open is the issue persists when connecting a chat widget using a compatible socketio client (>v3.x) |
I am using the
and adding following in credentials.yml:
And facing the same issue using: Receiving following in postman: Has anyone resolved the issue? What are the alternatives with rest api for webchat-tool? Is there any Docker Image for webchat-tool that we can use with rest-api-webhook? |
Nathan Zylbersztejn commented: I first got trapped into looking into conflicting dependencies, then I simply tried connecting the rasa chat widget (from the [hosted storybook|https://chat-widget-docs.rasa.com/?path=/docs/rasa-chat-widget--widget&globals=backgrounds.grid:false]) to a locally running rasa 3.2.5 instance. It works just fine: !image-20220823-090652.png|width=1388,height=721! But indeed, {{curl http://localhost:5005/socket.io}} returns the The client is using an unsupported version of the Socket.io or Engine.io protocols error. Which, from the [python-engineio repo|https://github.com/miguelgrinberg/python-engineio/blob/d3a23c0936cda2ff3de8c5ae0c834ffef515e8cb/src/engineio/asyncio_server.py#L228] is expected: !image-20220823-091009.png|width=528,height=185! Adding the required query param fixes the problem: Notice the GH user didn’t mention having issue with a chat widget 🙃 [~accountid:61dbef588534980073f91c40] , shall I just reply and close the issue? |
Anca Lita commented: Thanks for looking into this 🙌 Yes please reply on Github with your findings, this way the community encountering the same issue will understand the potential fix. I would also recommend updating our docs and/logs where applicable with this extra query parameter, do you know what it represents? |
Anca Lita commented: We can also look together which docs or internal logging needs to be updated, I don’t know off the top of my head either. |
Nathan Zylbersztejn commented: There was no issue to correct however the doc was updated to emphasize that compatibility between socket io client and server should be verified when implementing the channel |
h3. Rasa Open Source version
3.0
h3. Rasa SDK version
3.0
h3. Rasa X version
No response
h3. Python version
3.8
h3. What operating system are you using?
Linux
h3. What happened?
Socket.io channel returns 'unsupported version of protocols' - see error : [!https://user-images.githubusercontent.com/22718292/163340135-3933a9b3-de9a-4a44-931a-5051e01ea61a.png!| https://user-images.githubusercontent.com/22718292/163340135-3933a9b3-de9a-4a44-931a-5051e01ea61a.png] [!https://user-images.githubusercontent.com/22718292/163339967-c1aa270f-feb9-4ebe-8d30-9bbce9616f7a.png!| https://user-images.githubusercontent.com/22718292/163339967-c1aa270f-feb9-4ebe-8d30-9bbce9616f7a.png]
I have tried to connect to my Rasa server via websocket channels on multiple setups, all return this error. The set-ups are detailed here:
[!https://user-images.githubusercontent.com/22718292/163340631-6df6d5f9-d574-4571-987b-131df737aed9.png!| https://user-images.githubusercontent.com/22718292/163340631-6df6d5f9-d574-4571-987b-131df737aed9.png] [!https://user-images.githubusercontent.com/22718292/163340636-f0aa1c22-de72-4c91-aee7-18e790903221.png!| https://user-images.githubusercontent.com/22718292/163340636-f0aa1c22-de72-4c91-aee7-18e790903221.png]
The associated socket.io and sanic package versions are detailed here:
[!https://user-images.githubusercontent.com/22718292/163345213-02b96cc6-794b-4014-b2b1-0cd71f023b07.png!| https://user-images.githubusercontent.com/22718292/163345213-02b96cc6-794b-4014-b2b1-0cd71f023b07.png] [!https://user-images.githubusercontent.com/22718292/163345594-3dc5a3aa-803f-4cbb-bf0c-9b35d5e7bc28.png!| https://user-images.githubusercontent.com/22718292/163345594-3dc5a3aa-803f-4cbb-bf0c-9b35d5e7bc28.png]
[!https://user-images.githubusercontent.com/22718292/163341170-3c225371-246e-4987-b6f3-f46a08faedd0.png!| https://user-images.githubusercontent.com/22718292/163341170-3c225371-246e-4987-b6f3-f46a08faedd0.png] [!https://user-images.githubusercontent.com/22718292/163345686-c32abca8-0ed2-491e-bb16-0cf16d96fc23.png!| https://user-images.githubusercontent.com/22718292/163345686-c32abca8-0ed2-491e-bb16-0cf16d96fc23.png]
The advice I have received in the forums is to downgrade to this Sanic setup
however, this is not possible because - according to pip - Rasa 3.0 requires a minimum of sanic-routing==0.7.2 which then means sanic==21.6.0 is incompatible.
Due to this, I cannot interface with my chatbot using botfront or the rasa chat widget.
h3. Command / Request
h3. Relevant log output
The text was updated successfully, but these errors were encountered: