Error when upgrade to new Rasa version

Hi here.

I have quite a strange bug when I try to update an existing project from rasa 2.3.4 to 2.6.1 version. Indeed the upgrade is ok, I retrained the model and relaunched the rasa server but now I have an error when a user tries to connect to rasa with websocket.

This is the error:

connect async handler error
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/engineio/asyncio_server.py", line 447, in _trigger_event
    ret = await self.handlers[event](*args)
  File "/usr/local/lib/python3.7/dist-packages/socketio/asyncio_server.py", line 516, in _handle_eio_connect
    return await self._handle_connect(sid, '/')
  File "/usr/local/lib/python3.7/dist-packages/socketio/asyncio_server.py", line 417, in _handle_connect
    self.environ[sid])
  File "/usr/local/lib/python3.7/dist-packages/socketio/asyncio_server.py", line 498, in _trigger_event
    ret = await self.handlers[namespace][event](*args)
TypeError: connect() missing 1 required positional argument: 'auth'

And my credentials.yml file:

socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: true

The strange thing is if I try to install it on a new server there is no error (with the same files, model …), but when this is on an existing project there is this bug. When I downgrade to Rasa 2.3.4, the error disappear.

When I update to 2.6.1 I also update the socketio version of the frontend (v4), when I’m in 2.3.4 socketio is in v2.

If someone knows how to fix this bug it will be very helpfull, currently I can’t update bots in production :confused:

Thanks.

@vincentlaine can you do a pip freeze between the new server running 2.6.1 and your current broken server? I’d be looking for any differences between python-socketio and python-engineio… if there are differences, update those packages in your broken environment. If that doesn’t work, please post the pip freeze for both servers in here!

1 Like

@vincentlaine Do you know what version of Socket.IO the client is using? The error appears to be related to a mismatch between the server and client versions: Connection auth data not getting captured · Issue #606 · miguelgrinberg/python-socketio · GitHub

Thanks ! There was one major version difference with the python-socketio. I upgrade it and it solved the problem, thanks !

1 Like