Anchal
(Anchal)
August 12, 2021, 7:46am
1
Hi everyone ,
I’m not able to get the bot widget on the server because of the socket.io issues and I keep getting this error - index.js:123 GET http://localhost:5005/socket.io/?EIO=3&transport=polling&t=NilV9Fx 500 (Internal Server Error)
I’m using this code to show my bot on server -
Currently I’m using rasa-2.8 version. Any help/support regarding this will be appreciated.
nik202
(NiK202)
August 12, 2021, 9:33am
2
Heya @Anchal !
If you can tell which chatbot widget you are using for your project and where your bot is deployed or on which server?
Anchal
(Anchal)
August 12, 2021, 11:32am
3
Hey Nik
I haven’t deployed the bot yet,it is running on the localhost and I’m talking about the chat-widget that we get in the very start of a bot.
nik202
(NiK202)
August 12, 2021, 11:39am
4
@Anchal your chatbot widget name, which one you using?
nik202
(NiK202)
August 12, 2021, 2:39pm
6
@Anchal Great! So what the issue you getting and what are the steps you are following? and please can you share the error screenshot?
Few suggestions:
Hope you uncommented below snippet code in credentials.yml
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true
Hope you are using this snippet code:
<div id="webchat">
</div>
<script src="https://cdn.jsdelivr.net/npm/rasa-webchat/lib/index.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://">
<script>!(function () {
let e = document.createElement("script"),
t = document.head || document.getElementsByTagName("head")[0];
(e.src =
"https://cdn.jsdelivr.net/npm/rasa-webchat@1.0.1/lib/index.js"),
(e.async = !0),
(e.onload = () => {
window.WebChat.default(
{
selector: "#webchat",
initPayload: "/get_started",
customData: {"language": "en"}, // arbitrary custom data. Stay minimal as this will be added to the socket
socketUrl: "http://localhost:5005",
socketPath: "/socket.io/",
title: "Rasa Bot",
tooltipPayload: "/get_started",
tooltip: true,
tooltipDelay: 500,
subtitle: "Powered by XYZ",
connectingText: "Waiting for server...",
profileAvatar: "https://",
openLauncherImage: "https://",
params: {"storage": "session"},
mainColor: "#ffd600",
userBackgroundColor: "#ffd600",
userTextColor: "#cde9ce",
showMessageDate: false,
inputTextFieldHint: "Hi.Type your message here...",
badge: " ",
displayUnreadCount: true,
isChatOpen: false,
embedded: false,
showCloseButton: true,
fullScreenMode: true,
showFullScreenButton: true,
docViewer: false,
},
null
);
}),
t.insertBefore(e, t.firstChild);
})();
</script>
I hope you using index.html or directly in Wordpress site header and footer body section plug in.
Please ignore some of the field shown in the snippet code, used what best for your use case.
Please Note: Version 1.0.1 of the rasa webchat is made to work with version 2.3.x and 2.4.x of rasa or latest. Use 1.0.0 for other rasa versions.
Try run first on localhost, if you able to run on localhost, then later I will guide you how you can deploy server.
Good luck!
Anchal
(Anchal)
August 13, 2021, 7:52am
7
Hey Nik , Thankyou so much for your help ,it really worked out. I was missing a few things in index.html file but now its working fine on localhost. Let me know how can we deploy it on a real time tool.
nik202
(NiK202)
August 13, 2021, 12:04pm
8
@Anchal Great! Please can I request to close this thread with the solution for others?
@nik202 I am also getting the same issue on HTTPS, used your code mentioned above still getting same error. can you have a look at my question please?
I have bot deployed in aws with HTTPS and using rasa webchat script on one of my website which is also on HTTPS and I am getting the error on website for the bot to load.
WebSocket connection to 'wss://rasa-aws-url:82/socket.io/?EIO=4&transport=websocket&sid=FMfJTJy9o8KI15IbAAFH 'failed
and sometimes
WebSocket connection to 'wss://rasa-aws-url:82/socket.io/?EIO=4&transport=websocket&sid=dfSA6Yxg1H9z3BnvAAF1 ’ failed: Error during WebSocket handshake: Unexpected response code: 200
If I re…
nik202
(NiK202)
October 22, 2021, 9:08am
11
@Anchal Can, I request you Anchal to please close this thread with the solution for others. Thanks.
abhilash1
(Abhilash)
November 9, 2021, 9:00am
12
Hi, I am still getting the 500 error, I am using the same code and using RASA 2.3.8
InnoOmnia
(Inno Omnia)
November 9, 2021, 10:56am
13
You need to use webserver and real domain names to use it for real. Are you familiar how to do those?
InnoOmnia
(Inno Omnia)
November 9, 2021, 10:58am
14
What is your system architecture? Is it working in HTTP?
nik202
(NiK202)
November 9, 2021, 11:20am
16
@abhilash1 share the snippet code which you are using?
abhilash1
(Abhilash)
November 9, 2021, 11:24am
17
@nik202 I tried same code snippet which is mentioned in this thread. its not working.
Also earlier used following which was working earlier:-
<html>
<head>
<title>ChatBot</title>
<link rel="stylesheet" href="https://npm-scalableminds.s3.eu-central-1.amazonaws.com/@scalableminds/chatroom@master/dist/Chatroom.css" />
</head>
<body>
<div class="chat-container"></div>
<script src="https://npm-scalableminds.s3.eu-central-1.amazonaws.com/@scalableminds/chatroom@master/dist/Chatroom.js"/></script>
<script type="text/javascript">
var chatroom = new window.Chatroom({
host: "http://localhost:5005",
title: "Chat with CDA bot",
container: document.querySelector(".chat-container"),
welcomeMessage: "Hi, How may I help you?",
speechRecognition: "en-US",
voiceLang: "en-US"
});
chatroom.openChat();
</script>
</body>
</html>
this was also working fine earlier:-
<html>
<div id="rasa-chat-widget" data-websocket-url="http://localhost:5005/"></div>
<script src="https://unpkg.com/@rasahq/rasa-chat" type="application/javascript"></script>
</html>
nik202
(NiK202)
November 9, 2021, 11:30am
19
@abhilash1 check this link: Rasa chatbot website integration | Quick tutorial - YouTube you will able to integrate, can you even share rasa --version screenshot.
abhilash1
(Abhilash)
November 9, 2021, 11:45am
20
rasa --version
2021-11-09 17:12:23.662554: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /grid/sfi/farm/nflsf01//10.1/linux3.10-glibc2.17-x86_64/lib
2021-11-09 17:12:23.662975: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Rasa Version : 2.3.4
Rasa SDK Version : 2.4.0
Rasa X Version : 0.37.1
Python Version : 3.7.9
Operating System : Linux-3.10.0-514.el7.x86_64-x86_64-with-redhat-7.3-Maipo
Python Path : /lan/ops/cdnshelp/cops/users/pubtools/chatbot/Python-3.7.9/bin/python3.7
nik202
(NiK202)
November 9, 2021, 11:47am
21
@abhilash1 you can use rasa Webchat, but you need to mention 1.0.0 or 1.0.1 (I am not sure, since ages not changed my version) in version, but I would highly recommend to upgrade the rasa at least to 2.8.1. Good Luck!