Requested URL /socket.io/ not found

I have a problem that is plaguing me.

When I run rasa shell and interact with the bot I get the following in the terminal

Exception occurred while handling uri: 'http://localhost:5005/socket.io/?EIO=3&transport=polling&t=N84yaDd'
Traceback (most recent call last):
  File "/opt/anaconda3/envs/rasa-workshop/lib/python3.7/site-packages/sanic/app.py", line 940, in handle_request
    handler, args, kwargs, uri, name = self.router.get(request)
  File "/opt/anaconda3/envs/rasa-workshop/lib/python3.7/site-packages/sanic/router.py", line 411, in get
    return self._get(request.path, request.method, "")
  File "/opt/anaconda3/envs/rasa-workshop/lib/python3.7/site-packages/sanic/router.py", line 475, in _get
    raise NotFound("Requested URL {} not found".format(url))
sanic.exceptions.NotFound: Requested URL /socket.io/ not found

After the error, it does reply correctly.

This bot is not configured for socket io. I have the default credentials.yml file (attached fwiw)

I’m using the following versions: python 3.7.5 rasa 1.1.0

I’m also using Anaconda as my virtual environment.

for grins I create a new directory / new virtual environment, ran a rasa init, went straight to the shell from that process and it does the exact same thing with un-adultered code.

It might be because you have a socket client open in your browser. Check if you have any socket channel based client (like rasa-webchat) open in browser and close it before starting the shell.

1 Like

Yep that was it #facepalm

Thanks

1 Like

Hey @ jonathanpwheat . According to this tutorial, this problem also appears after running rasa run -m models --enable-api --cors "*" --debug. What should I do to solve it?

Hi @Neary-li, I had multiple terminals opened, and had the exact statement you have above running in one that was minimized. Once I closed it, the problem went away because it terminated that other socket.io process.

Do you have multiple terminals opened? I hate to say reboot, because that’s overkill, but it will surely stop any stuck / running socket.io processes that my be still going.