rasa-webchat icon indicating copy to clipboard operation
rasa-webchat copied to clipboard

UI is just a blank screen

Open nobodhi opened this issue 7 years ago • 11 comments

If I run the core as a socket.io server directly as is described in the rasa docs: https://rasa.com/docs/core/connectors/#socketio-connector I get polling requests to the Rasa server which return 404s. And the web page is blank.

If I run the core as a socket.io server using python as is described in the rasa docs: https://rasa.com/docs/core/connectors/#id21 I get polling requests to the Rasa server which return 200s. And the web page is blank.

Is there a a UI served from index.html? Thanks!

nobodhi avatar Feb 23 '19 00:02 nobodhi

Same issue. UI is blank.

mirfan899 avatar Feb 26 '19 12:02 mirfan899

By default the hideWhenNotConnected parameter is true, which means that the widget will hide if it cannot connect to the socket. Make sure you set the socket and socketPath params correctly

znat avatar Feb 26 '19 13:02 znat

I got this.

127.0.0.1 - - [2019-02-26 19:54:30] "POST /socket.io/?EIO=3&transport=polling&t=MagJCnk&sid=aaecc8a6696f41eb8528fe1189000584 HTTP/1.1" 200 195 0.000663
127.0.0.1 - - [2019-02-26 19:54:30] "GET /socket.io/?EIO=3&transport=polling&t=MagJ6fH&sid=aaecc8a6696f41eb8528fe1189000584 HTTP/1.1" 200 211 25.120419

and it goes forever. No UI.

mirfan899 avatar Feb 26 '19 14:02 mirfan899

can you share the widget config and Rasa Core crendentials.yaml ?

znat avatar Feb 26 '19 15:02 znat

<div id="webchat"/>
<script>
  WebChat.default.init({
    selector: "#webchat",
    initPayload: "/get_started",
    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:5002",
    socketPath: "/socket.io/",
    title: "Title",
    subtitle: "Subtitle",
    inputTextFieldHint: "Type a message...",
    connectingText: "Waiting for server...",
    hideWhenNotConnected: true,
    fullScreenMode: false,
    profileAvatar: "http://to.avat.ar",
    openLauncherImage: 'myCustomOpenImage.png',
    closeLauncherImage: 'myCustomCloseImage.png',
    params: {
      images: {
        dims: {
          width: 300,
          height: 200,
        }
      },
      storage: "local"
    }
  })
</script>
socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: true

mirfan899 avatar Feb 26 '19 18:02 mirfan899

change hideWhenNotConnected: true, to hideWhenNotConnected: false,

oldmonkABA avatar Mar 08 '19 10:03 oldmonkABA

It's working now using hideWhenNotConnected: false but another issue occurred. It says waiting for server when I've correctly connected it to rasa server using socket.

mirfan899 avatar Mar 08 '19 10:03 mirfan899

upgrade to latest rasa_core see this : https://github.com/mrbot-ai/rasa-webchat/issues/28

oldmonkABA avatar Mar 08 '19 10:03 oldmonkABA

Did someone solve this issue? I still getting "Waiting for server..." and can't type anything.

Please, help me configure Rasa X and Rasa-Webchat to interact with each other.

Logs:

2019-06-21 12:09:15 INFO     engineio.server  - 9a588e8482e840efbb49d93619d03712: Sending packet OPEN data {'sid': '9a588e8482e840efbb49d93619d03712', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
2019-06-21 12:09:15 DEBUG    rasa.core.channels.socketio  - User 9a588e8482e840efbb49d93619d03712 connected to socketIO endpoint.
2019-06-21 12:09:15 INFO     engineio.server  - 9a588e8482e840efbb49d93619d03712: Sending packet MESSAGE data 0

Backend db: sqlite

Versions:

rasa                    1.1.3
rasa-sdk                1.1.0
rasa-x                  0.19.2

Webchat

<script src="https://storage.googleapis.com/mrbot-cdn/webchat-0.5.9.js"></script>
<script>
	WebChat.default.init({
		selector: "#webchat",
		//initPayload: "/get_started",
		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: "Title",
		subtitle: "Subtitle",
		inputTextFieldHint: "Type a message...",
		connectingText: "Waiting for server...",
		hideWhenNotConnected: false,
		fullScreenMode: false,
		//profileAvatar: "https://rasa.com/assets/img/demo/rasa_avatar.png",
		openLauncherImage: 'myCustomOpenImage.png',
		closeLauncherImage: 'myCustomCloseImage.png',
		params: {
			images: {
				dims: {
					width: 1000,
					height: 1000,
				}
			},
			storage: "local"
		}
	})
</script>

Config:

socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: false

Changing session_persistence to true doesn't do anything.

Changing webchat's version to 0.4.1 allows to type messages but rasa backend still doesn't accept anything.

Using rest api channel with another webchat repository works.

true1337 avatar Jun 21 '19 09:06 true1337

Did someone solve this issue? I still getting "Waiting for server..." and can't type anything

SallemiDorsaf avatar Aug 16 '19 09:08 SallemiDorsaf

@SallemiDorsaf check https://github.com/RasaHQ/rasa/issues/4204

santteegt avatar Aug 26 '19 00:08 santteegt