Fatal error - engineio.server - https://mysite.com is not an accepted origin. after upgrade

After run pip3 install rasa --upgrade

I started to get the message: engineio.server - https://mysite.com is not an accepted origin.

Now my webchat is broken and I’m stuck !!!

It seems to be related to cors but I tried the command above and still it didn’t work.

rasa run --m models/dialogue --enable-api --debug --endpoints endpoints.yml --credentials credentials.yml --cors ‘*’

Thanks !

2 Likes

I encounter exactly same problem. I try to install a older version still don’t work

2 Likes

Hi,

I have also come across this problem today after pulling updating my Rasa Docker image (:latest). I pulled a few old tags and tested to see which image the bug snuck in.

1.0.0 to 1.1.8 works, the bug appears from 1.2.0 up.

Here are the console read outs:

rasa/rasa:1.1.8

docker run --rm -p 5005:5005 -v $(pwd)/models:/app/models rasa/rasa:1.1.8 run --credentials creditials.yml --endpoints endpoints.yml --connector socketio --cors *

2019-08-08 10:46:57 INFO     engineio.server  - Server initialized for sanic.
2019-08-08 10:46:57 INFO     root  - Starting Rasa server on http://localhost:5005
2019-08-08 10:47:04 INFO     engineio.server  - c7e89e35fe1745449843515507bb4e25: Sending packet OPEN data {'sid': 'c7e89e35fe1745449843515507bb4e25', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
2019-08-08 10:47:04 INFO     engineio.server  - c7e89e35fe1745449843515507bb4e25: Sending packet MESSAGE data 0
2019-08-08 10:47:04 INFO     engineio.server  - c7e89e35fe1745449843515507bb4e25: Received request to upgrade to websocket
2019-08-08 10:47:04 INFO     engineio.server  - c7e89e35fe1745449843515507bb4e25: Upgrade to websocket successful

rasa/rasa:1.2.0

docker run --rm -p 5005:5005 -v $(pwd)/models:/app/models rasa/rasa:1.2.0 run --credentials creditials.yml --endpoints endpoints.yml --connector socketio --cors *
2019-08-08 10:52:29 INFO     engineio.server  - Server initialized for sanic.
2019-08-08 10:52:29 INFO     root  - Starting Rasa server on http://localhost:5005
2019-08-08 10:52:35 INFO     engineio.server  - http://localhost:5006 is not an accepted origin.
2019-08-08 10:52:42 INFO     engineio.server  - http://localhost:5006 is not an accepted origin.
2019-08-08 10:52:49 INFO     engineio.server  - http://localhost:5006 is not an accepted origin.

I hope this helps tracking down the problem :slight_smile:

Work around: pip3 uninstall python-engineio pip3 install python-socketio==4.2.0

Rasa 1.2.2

I had this error when testing on localhost too, and managed to fix it by specifying the versions for socketio and engineio:

python-engineio = "<3.9"
python-socketio = "<4.3"

python-engineio 3.9 had the error in all versions I tested. python-socketio 4.3 imports engineio >=3.9.

I’m using Rasa 1.2.2 and Rasa X 0.20.0.

Even if I pip3 install python-socketio <= 4.2 it stills install python-engineio 3.9.3

You need to specify both versions, like so:

pip3 install "python-socketio<4.3" "python-engineio<3.9"
Collecting python-socketio<4.3
  Downloading https://files.pythonhosted.org/packages/38/cc/bfd45ea90c178184ee490a404430ccd628d365da01d2761b3ca28e598e7f/python_socketio-4.2.1-py2.py3-none-any.whl (46kB)
     |████████████████████████████████| 51kB 3.8MB/s 
Collecting python-engineio<3.9
  Using cached https://files.pythonhosted.org/packages/bd/b8/0fc389ca5c445051b37b17802f80bbf1b51c1e3b48b772ee608efbb90583/python_engineio-3.8.2.post1-py2.py3-none-any.whl
Collecting six>=1.9.0 (from python-socketio<4.3)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: six, python-engineio, python-socketio
Successfully installed python-engineio-3.8.2.post1 python-socketio-4.2.1 six-1.12.0

Or use pipenv and add them to your Pipfile:

...
[packages]
# socketio/engineio: fixes error with "is not an accepted origin"
python-engineio = "<3.9"
python-socketio = "<4.3"

...
1 Like

Thanks that worked :3

1 Like

Sorry, I just copy the wrong line from my terminal.

pip3 uninstall python-socketio pip3 install python-socketio==4.2.0

pip3 uninstall python-engineio pip3 install python-engineio==3.8.2

Rasa 1.2.2