Rasa webchat is not working in linux 16.04

Hello,

I created a Rasa chatbot using rasa 1.1.8 in Ubuntu 16.04. While trying it with webchat it is working well in command line but the bot is not running in chat.html it is showing “null is not an accepted origin”. How can I fix this??

Thanks in advance!

Could you please provide some more details? e.g. how you’re running your bot, the config of the webchat widget etc

Hi, the solution is described here: Fatal error - engineio.server - https://mysite.com is not an accepted origin. after upgrade

I already tried that solution but still facing the same issue.

This is the configuration of webchat widget and I am using Rasa train and Rasa run to make work this webchat.

<html>
<body>
<div id="webchat"/>
<script src="https://storage.googleapis.com/mrbot-cdn/webchat-0.5.8.js"></script>
<script>
WebChat.default.init({
selector: "#webchat",
interval: 1000, // 1000 ms between each message
customData: {"userId": "123"}, // arbitrary custom data. Stay minimal as this will be added to the socket
socketUrl: "http://localhost:5005",
socketPath: "/socket.io/",
title: "Infra Bot",
inputTextFieldHint: "Type a message...",
connectingText: "Waiting for server...",
hideWhenNotConnected: true,
fullScreenMode: false,
profileAvatar: "https://cdn.pixabay.com/photo/2015/06/12/18/31/cute-807306__340.png",
openLauncherImage: 'https://www.peerbits.com/wp-content/uploads/2018/01/chat-bot-call-to-action-white-paper1.png',
closeLauncherImage: 'https://www.peerbits.com/wp-content/uploads/2018/01/chat-bot-call-to-action-white-paper1.png',
params: {
  images: {
    dims: {
      width: 300,
      height: 200,
    }
  },
  storage: "session"
}
})
</script>
</body>
</html>

Make sure, port is correct and server is running without errors (warnings are fine)…

socketUrl: "http://localhost:5005"

if you’re running on localhost all should work fine. We did however discover a bug in the socketio channel that may cause issues if you’re running rasa on a server with a different host, which we’re working on fixing

1 Like