After upgrade (1.6.0) RASA is blocked by the browser

Hi

I have upgraded my RASA:

Previous the following packages were installed with pip install -r requirements_dev.txt :

rasa==1.4.0
spacy==2.1.8
rasa-sdk==1.4.0
numpy==1.16.0
python-socketio==4.3.1
python-engineio==3.9.3
livereload
pytest==5.2.2
cx_Oracle==7.2.2
python-dateutil==2.8.0
multidict==4.6.1

To start the chatbot I did this:

Terminal 1:

rasa train 

Terminal 2:

rasa run --endpoints endpoints.yml --credentials credentials.yml

Terminal 3:

rasa run actions --actions actions

Terminal 4:

livereload

After all these steps the chatbot started running in my browser. Everything was working fine. However, I wanted to use the latest RASA version. Therefore I did an upgrade. I installed the following packages:

rasa==1.6.0
spacy==2.1.8
rasa-sdk==1.6.0
numpy==1.16.0
python-socketio==4.3.1
python-engineio==3.9.3
livereload
pytest==5.2.2
cx_Oracle==7.2.2
python-dateutil==2.8.0
multidict==4.6.1
sanic==19.9.0

The rest of the code was kept the same. After I do rasa train I run terminal 1 - terminal 4 (see commands above). Now I am facing the following problems:

The browser window keeps empty :frowning: The bot is not starting in the browser (Chrome & Firefox). With ctrl+shift+i in chrome I can see the following problems: The bot is getting blocked!

The error says:

Access to XMLHttpRequest at 
'http://localhost:5005/socket.io/?EIO=3&transport=polling&t=M-5c3RW' from
origin 'http://127.0.0.1:35729' has been blocked by CORS policy: 
No 'Access-Control-Allow-Origin' header is present on the requested resource.

This is my endpoints.yml:

action_endpoint:
  url: http://localhost:5055/webhook

This is my credentials.yml:

socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: true

rest:
#  # you don't need to provide anything here - this channel doesn't
#  # require any credentials

rasa:
  url: "http://localhost:5002/api"

You have any idea how to solve it?

You can add --cors "*" to your rasa run command. Something like this might work rasa run --endpoints endpoints.yml --credentials credentials.yml --cors "*"

Maybe that solves it?

Sounds interesting! Thanks a lot.

I changed the command in terminal 2 to this:

rasa run --endpoints endpoints.yml --credentials credentials.yml --cors "*"

The rest was kept the same as mentioned in my first post.

Bad news:

  • still no output in the browser

Good news:

  • No error message (see figure in my first post) anymore. Instead it looks like this (in Chrome & Firefox):

In terminal 2 I get the following messages:

UserWarning: A message without a valid sender_id was received. This message will be ignored. 
Make sure to set a proper session id using the `session_request` socketIO event.
"A message without a valid sender_id "
Exception occurred while handling uri: unknown
NoneType: None
Exception occurred while handling uri: unknown
NoneType: None

Cool! At least one problem less :slight_smile:

I have never used socketio so I can’t help much here. How were the sender_id normally set?