So, i have create a chatbot with rasa and i use socket io for my web page. I want to test it with other people, so i came across with ngrok. I follow all the steps and finally it works on my machine perfectly!
In details, i use the ngrok url, something like : https://xxxx.xxxxxxx.ngrok.io on my machine and works fine. But when i share this link in other people, they only see the index hml with the correct css but the chatbot icon doesn;t show. And they get a message " xhr poll error connection refused" :
Do you have any idea ??
Thank you in advance
Not sure how you call in index.js the rasa API, but I guess you have to change the URL with localhost references to the new ngrok URL and no 5005 port if ngrok is listening on port 443.
window.WebChat.default(
{
…
socketUrl: “http://localhost:5005”,
socketPath: “/socket.io/”,
…
the version of rasa and etc :
Rasa Version : 2.8.2
Minimum Compatible Version: 2.8.0
Rasa SDK Version : 2.8.1
Python Version : 3.8.11
I write my steps for more details:
i’m running action server on 5055 port,
rasa on 5005 with rasa run --m ./models --endpoints endpoints.yml --port 5005 -vv --enable-api --cors “*”
and python -m http.server Serving HTTP on :: port 8000 (http://[::]:8000/)
In this way i connect ngrok with 8000 (ngrok http 8000).
First, thank you for your time!
So i will explain my steps, because i think that i’m missing something important…
I’m running my action server on port 5055
endpoint file is like:
action_endpoint:
url: http://localhost:5055/webhook
Next steps is to run my rasa server on 5005 port like this:
rasa run --m ./models --endpoints endpoints.yml --port 5005 -vv --enable-api --cors “*”
Then i get the ngrok url (for 5005 port), and paste it in index.html like this:
socketUrl: “https://xxx.xxxxxxx.ngrok.io”,
but when i ran on my browser, the ngrok url (https://xxx.xxxxxxx.ngrok.io), i get a message from server i guess “Hello from Rasa: 2.8.2”.
Please let me tell you that i want to use ngrok to expose my web chat to other users in order to test it. So in my mind i was thinking that i should expose port of web chat, not the posrt of rasa server…
i
Could please help me to understand…
@DimitraK Right, are you using any website or just a localhost for index.html check the port of local host first, then in sockelUrl: just mention localhost 5005 and then run ngrok for localhost with port.
On the other hand if you have running website then scenario will be different.
Hmm…
i try this way but i get the same error as my first message.
So i have a page index.html that runs on localhost and for example at port 5051, i get the ngrok url for 5051 port and finally it runs perfect on my computer. But when i share this link with others, they can see the index html but there is no chatbot icon and they get error like http://localhost:PORT THAT RUNS RASA SERVER… net:ERR_CONNECTION_REFUSED xhr poll error.
Any suggestions??!
p.s. i run rasa with this command
rasa run --m ./models --endpoints endpoints.yml --port 5005 -vv --enable-api --cors “*”