RasaHQ/rasa-voice-interface

Error: Requested URL /socket.io/ not found

saravananselvamohan opened this issue · 4 comments

After npm run serve
1.Rasa core is up and running in http://localhost:5005/
2.But yet port 8080 not able to connect to the 5005 port
3. While Inspecting in Chrome browser for http://localhost:8080/#/ it's giving CORS issue

Using rasa shell --cors "*" the cors error disappeared but new errors now show up in the browser console:

image

I had the same CORS issue, the following fixed that for me.
In your socketio_connector.py under class SocketIOInput(InputChannel) while def blueprint try changing sio = AsyncServer(async_mode="sanic") to sio = AsyncServer(async_mode="sanic", cors_allowed_origins='*'). And I just run rasa server with rasa run, no need for --cors "*"
I believe there has been several releases of rasa since the blog post changing how Rasa implements CORS policy. Hope that helps!

Probably this issue is because the socket connector is not configured properly.
Following steps fixed CORS error for me and Sara bot is up and running.

Use the command to start Rasa : rasa run --enable-api -p 5005 --cors "*"
Configure in endpoints.yml file :
url: "http://localhost:5005/webhook"
In credentials.yml file :
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true/false

@ZyrianovS , Thanks. It solved my issue.