Rasa 3 socket.io not working

Am trying to check Rasa3 for our use along with the front end of rasa chat widget given in the Rasa docs, it gives socketIO error as follows, pls help me.

The WebSocket transport is not available, you must install a WebSocket server that is compatible with your async mode to enable it. See the documentation for details. (further occurrences of this error will be logged with level INFO) Exception occurred while handling uri: ‘http://localhost:5005/socket.io/?EIO=4&transport=polling&t=Nrsc8fI’ Traceback (most recent call last): File “handle_request”, line 83, in handle_request class Sanic(BaseSanic, metaclass=TouchUpMeta): File “d:\python38\lib\site-packages\engineio\asyncio_server.py”, line 317, in handle_request return await self._make_response(r, environ) File “d:\python38\lib\site-packages\engineio\asyncio_server.py”, line 385, in _make_response response = make_response( File “d:\python38\lib\site-packages\engineio\async_drivers\sanic.py”, line 102, in make_response return HTTPResponse(body=payload, content_type=content_type, TypeError: ‘NoneType’ object is not callable Exception occurred while handling uri: ‘http://localhost:5005/socket.io/?EIO=4&transport=polling&t=Nrsc8_p’ Traceback (most recent call last): File “handle_request”, line 83, in handle_request class Sanic(BaseSanic, metaclass=TouchUpMeta):

@Seenivasan After a lot of struggle finally!

Please install :

pip install sanic==21.6.0
pip install Sanic-Cors==1.0.0
pip install sanic-routing==0.7.0

if there are any dependencies do let me know please and mention @ nik202

Note: This solution working on rasa 3.0 and rasa webchat

Screenshot 2021-12-02 at 3.38.29 AM

1 Like

Thanks @nik202. Am using Windows 10 PC for rasa server and the rasa web chat also in the same PC. Now the earlier is not occuring, but the following issue is showing both using MS Edge and Chrome.

The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO) Exception occurred while handling uri: ‘http://localhost:5005/favicon.ico’ Traceback (most recent call last): File “d:\python38\lib\site-packages\sanic_routing\router.py”, line 79, in resolve route, param_basket = self.find_route( File “”, line 9, in find_route sanic_routing.exceptions.NotFound: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “d:\python38\lib\site-packages\sanic\router.py”, line 33, in _get return self.resolve( File “d:\python38\lib\site-packages\sanic_routing\router.py”, line 96, in resolve raise self.exception(str(e), path=path) sanic_routing.exceptions.NotFound: Not Found

@Seenivasan share with me socket.io and engine.io and also rasa --version.

hi @nik202 I was also not able to get responses from webchat to rasa, its just showing socket.io not found. Below are the version of socketio, engineio and rasa

rasa: 3.0.0
python-engineio = ">=4,<5.0.0 || >5.0.0,<6"
python-socketio = ">=4.4,<6"

These are the versions and I tried with rasa-webchat by botfront and rasa-widget mentioned on docs. I think this is the same issue like 2.3.x and 2.4.x had. Let me know if you have other thoughts

@Horizon733 can you share the your rasa --version ? and did you seen my above posts for the same? and what error message you are getting?

Oh my bad, it worked. I forgot to add socketio in credentials😂

When we change these version, there are few fallbacks,

  1. Sanic will give timeout errors when you use forms and have customized them.
  2. We can’t use Entity Extractors properly since they too use async so giving timeout errors.

I did tried them so I reported here. Please let me know if you find something.
Rasa version:

Rasa Version      :         3.0.0
Minimum Compatible Version: 3.0.0
Rasa SDK Version  :         3.0.1
Rasa X Version    :         None
Python Version    :         3.7.5
Operating System  :         Windows-10-10.0.19041-SP0
Python Path       :         d:\hoory\betting-bot\hoory-env\scripts\python.exe

@Horizon733 Sure Dishant :slight_smile: thanks for the update.

1 Like

@nik202 your suggestion worked for me Thank you

Great @RajithaBandara :+1: can you share the rasa --version and socketIO related packages with the version please, whenever you get some time. Many thanks in advance.

Hi @nik202! Seems like I’ve got a similar issue, but struggling to get past it. I tried your instruction above install those 3 pip things, but still no websocket working.

When I send test msg on postman, I get this response: “The client is using an unsupported version of the Socket.IO or Engine.IO protocols” image

When I run rasa --version I get this read out in vscode:

C:\Python310\lib\site-packages\rasa\core\tracker_store.py:1048: MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to “sqlalchemy<2.0”. Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: Error Messages — SQLAlchemy 2.0 Documentation) Base: DeclarativeMeta = declarative_base() Rasa Version : 3.5.4 Minimum Compatible Version: 3.5.0 Rasa SDK Version : 3.5.0 Python Version : 3.10.11 Operating System : Windows-10-10.0.19045-SP0 Python Path : C:\Python310\python.exe

Do you know where I’m going wrong?

Also, I am running my rasa server, via docker. So my container setup was done like this: docker run -it -p 8080:8080 -v ${pwd}:/app rasa/rasa:latest-full run --enable-api --port 8080 --cors=“*”

^Is this correct, too?

Please help!

I also checked my sanic version. It is this: sanic --version Sanic 21.12.2; Routing 0.7.2

Are these okay?

@hgoona depends on the version you are using.

@nik202 which versions do i need to check? I’ve been stuck on this for hours… I’d greatly appreciate any help to figure this out! :pray:t5:

@hgoona I will recommend checking for 2.8.11 and then 3.0

you mean downgrading to Rasa 3.0 ?

@hgoona Well it’s an issue of Rasa bot front issue not an issue with Rasa itself. If you have explored the forum. I have already provided the solutions which best solve this issue. You need to try the versions.

@hgoona

Rasa Version      :         2.8.11
Minimum Compatible Version: 2.8.9 
Rasa SDK Version  :         2.8.6 
Rasa X Version    :         None  
Python Version    :         3.8.13

Hope this will help you.

python-engineio              4.3.3
python-socketio              5.7.1

sanic                        20.9.1
Sanic-Cors                   0.10.0.post3
sanic-jwt                    1.6.0
Sanic-Plugins-Framework      0.9.5
sanic-routing                0.7.2

I’m not using bot front though - im trying to send a message via Postman to then setup my own front end…