Unable to receive response from rasa server

Hi,I’m using rasa and rasa-webchat to develop a chatbot system.My env is: rasa:2.7.1 rasa-sdk:2.7.0 python-engineio:4.2.0 python-socketio==5.3.0

credentials.yml: image

And this is my index.html:

After starting the rasa server and open index.html,rasa server can receive the message and process successfully while input ‘hello’,but I find errors in browser and I’m not sure whether the error cause the client not to show the response from rasa server.please help. The client error: image

the server log:

@i-love-doufunao Hey! Nothing to worry, your code is fine, just you need to add something, which you forgot whilst copying a code from Botfront :slight_smile:

Please follow this:

  1. Add (e.src = “https://cdn.jsdelivr.net/npm/rasa-webchat@1.0.1/lib/index.js”),

Check the documentation of Botfront: GitHub - botfront/rasa-webchat: A feature-rich chat widget for Rasa and Botfront. It should be 1.0.1 for 2.3.x and 2.4.x less version required 1.0.0.

  1. You also need to add | update:

     socketUrl: "http://localhost:5005", 
     socketPath: "/socket.io/",

I don’t know why you have mention if its your live IP or domain running on server then its fine, else first check with localhost that its working on not? If you using for website and website is live then you need to use ngrok and paste the ngrok here for port 5005.

Concern: Even following the all step, you can see the error for python-socketio or engineio. If not you good to go.

I hope it is solution for you. If your problem persist do mention me. Good Luck!

@nik202 Thanks for your reply,I have changed the code as your suggestions but the error still exists.please help. image

@i-love-doufunao What steps you following? Tell me and what is the error now?

For rasa server(the rasa server is in localhost):

1,to start action server(we have implemented some actions below actions folder): rasa run actions --actions actions --cors “*” -vv

2,to start core server: rasa run --enable-api -m models/20210706-194813.tar.gz --port 5005 -vv --cors “*” --debug

3.to open the index.html in browser,input ‘hello’,but no response shows: image

4.there is still the error: image

@i-love-doufunao Please see this video https://youtu.be/eJMT2FovZsM follow some of the step as per your needs. Hope this will solve your issue. If still, I can provide online assistant if you like do share me the email.

1 Like