Exception occurred while handling uri ws://ngrok.io/socket.io/ in RASA 3.0.0

I’m not sure what’s this error about, I tried upgrading few packages downgrading packages still could not resolve it. I have attached my requirements.txt. Please help me resolve on this. TIA

[ERROR] Exception occurred while handling uri: 'ws://921a-2405-201-d00a-5091-84ad-c0e9-2dcf-15fa.ngrok.io/socket.io/?transport=websocket&EIO=4&t=1646328007.1467953'
Traceback (most recent call last):
  File "c:\xxxxxxxx\rasa_space\lib\site-packages\sanic\server\protocols\websocket_protocol.py", line 119, in websocket_handshake
    subprotocols = list(subprotocols)
  File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python37\lib\typing.py", line 254, in inner
    return func(*args, **kwds)
  File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python37\lib\typing.py", line 634, in __getitem__
    params = tuple(_type_check(p, msg) for p in params)
  File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python37\lib\typing.py", line 634, in <genexpr>
    params = tuple(_type_check(p, msg) for p in params)
  File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python37\lib\typing.py", line 142, in _type_check
    raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: Parameters to generic types must be types. Got 0.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "handle_request", line 83, in handle_request
    class Sanic(BaseSanic, metaclass=TouchUpMeta):
  File "c:\xxxxxxxx\rasa_space\lib\site-packages\engineio\asyncio_server.py", line 259, in handle_request
    jsonp_index)
  File "c:\xxxxxxxx\rasa_space\lib\site-packages\engineio\asyncio_server.py", line 418, in _handle_connect
    ret = await s.handle_get_request(environ)
  File "c:\xxxxxxxx\rasa_space\lib\site-packages\engineio\asyncio_socket.py", line 89, in handle_get_request
    return await getattr(self, '_upgrade_' + transport)(environ)
  File "c:\xxxxxxxx\rasa_space\lib\site-packages\engineio\asyncio_socket.py", line 142, in _upgrade_websocket    return await ws(environ)
  File "c:\xxxxxxx\rasa_space\lib\site-packages\engineio\async_drivers\sanic.py", line 122, in __call__
    self._sock = await protocol.websocket_handshake(request)
  File "c:\xxxxxxx\rasa_space\lib\site-packages\sanic\server\protocols\websocket_protocol.py", line 132, in websocket_handshake
    raise ServerError(msg, status_code=500)
sanic.exceptions.ServerError: Failed to open a WebSocket connection.
[requirement.txt|attachment](upload://xDxHwIj4ZqseNac1u3ZR1qaUSfJ.txt) (4.8 KB)

Below are my core packages:

rasa                    3.0.0
rasa-sdk             3.0.0
sanic                   21.9.3
Sanic-Cors              1.0.1
sanic-jwt               1.7.0
sanic-plugin-toolkit    1.2.1
sanic-routing           0.7.2

@Sumitraj_Patil can you see this thread conversation for the solution: Fail to load webchat bot on webpage using ngrok - #12 by vio_lovis

After changing packages as suggested I got below error

Traceback (most recent call last):
  File "c:\xxxxx\rasa_space\lib\site-packages\socketio\asyncio_server.py", line 504, in _handle_event_internal
    r = await server._trigger_event(data[0], namespace, sid, *data[1:])
  File "c:\xxxxx\rasa_space\lib\site-packages\socketio\asyncio_server.py", line 531, in _trigger_event
    ret = await self.handlers[namespace][event](*args)
  File "c:\xxxxx\rasa_space\lib\site-packages\rasa\core\channels\socketio.py", line 232, in handle_message
    if not data.get("session_id"):
AttributeError: 'str' object has no attribute 'get'

My packages are as below:

python-engineio         4.2.1
python-socketio         5.4.0
rasa                    3.0.0
rasa-sdk                3.0.0
sanic                   21.6.0
Sanic-Cors              1.0.0
sanic-jwt               1.7.0
sanic-plugin-toolkit    1.2.1
sanic-routing           0.7.0

My socket client code:

import socketio
sio = socketio.Client()

sio.connect('http://localhost:5005/socket.io', transports='websocket')
sio.emit("user_uttered", "Hi")

Please let me know what’s going wrong. TIA

@Sumitraj_Patil is this still the issue at your side?