question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chat window doesn't work "Waiting for server". Early version doesn't return answers.

See original GitHub 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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
znatcommented, Aug 15, 2019

Ok, your problem is because is because engineio has been updated and requires now an explicit CORS directive. You can see how we do it for Botfront: https://github.com/botfront/rasa-addons/blob/c82ac585c028b76e87580ee18ec6e815d719b088/rasa_addons/core/channels/webchat.py#L148

0reactions
TarunKumar50commented, Aug 16, 2019

@znat now bot is getting connected but not getting answer from bot. if you can help would be great.thanks.

Here is my config.yml file

Configuration for Rasa NLU.

https://rasa.com/docs/rasa/nlu/components/

language: en pipeline: supervised_embeddings

Configuration for Rasa Core.

https://rasa.com/docs/rasa/core/policies/

policies:

  • name: “KerasPolicy” featurizer:
    • name: MaxHistoryTrackerFeaturizer max_history: 5 state_featurizer:
      • name: BinarySingleStateFeaturizer
  • name: “MemoizationPolicy” max_history: 5
  • name: “FallbackPolicy” nlu_threshold: 0.4 core_threshold: 0.3 fallback_action_name: “utter_default”

When training the core getting "Object of type ‘MaxHistoryTrackerFeaturizer’ is not JSON serializable’


2019-08-16 11:19:33 INFO rasa.core.policies.keras_policy - Done fitting keras policy model Processed trackers: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 17/17 [00:00<00:00, 657.52it/s, # actions=105] Processed actions: 105it [00:00, 5027.53it/s, # examples=105] 2019-08-16 11:19:34 INFO rasa.core.agent - Persisted model to ‘/tmp/tmp5vuuy737/core’ Core model training completed. Traceback (most recent call last): File “/home/vinbox/Documents/environments/my_env/bin/rasa”, line 11, in <module> sys.exit(main()) File “/home/vinbox/Documents/environments/my_env/lib/python3.6/site-packages/rasa/main.py”, line 76, in main cmdline_arguments.func(cmdline_arguments) File “/home/vinbox/Documents/environments/my_env/lib/python3.6/site-packages/rasa/cli/train.py”, line 112, in train_core kwargs=extract_additional_arguments(args), File “/home/vinbox/Documents/environments/my_env/lib/python3.6/site-packages/rasa/train.py”, line 243, in train_core kwargs=kwargs, File “uvloop/loop.pyx”, line 1417, in uvloop.loop.Loop.run_until_complete File “/home/vinbox/Documents/environments/my_env/lib/python3.6/site-packages/rasa/train.py”, line 299, in train_core_async kwargs=kwargs, File “/home/vinbox/Documents/environments/my_env/lib/python3.6/site-packages/rasa/train.py”, line 337, in _train_core_with_validated_data new_fingerprint = await model.model_fingerprint(file_importer) File “/home/vinbox/Documents/environments/my_env/lib/python3.6/site-packages/rasa/model.py”, line 216, in model_fingerprint config, include_keys=CONFIG_MANDATORY_KEYS_CORE File “/home/vinbox/Documents/environments/my_env/lib/python3.6/site-packages/rasa/model.py”, line 241, in _get_hash_of_config return get_dict_hash(sub_config) File “/home/vinbox/Documents/environments/my_env/lib/python3.6/site-packages/rasa/core/utils.py”, line 357, in get_dict_hash return md5(json.dumps(data, sort_keys=True).encode(encoding)).hexdigest() File “/usr/lib/python3.6/json/init.py”, line 238, in dumps **kw).encode(obj) File “/usr/lib/python3.6/json/encoder.py”, line 199, in encode chunks = self.iterencode(o, _one_shot=True) File “/usr/lib/python3.6/json/encoder.py”, line 257, in iterencode return _iterencode(o, 0) File “/usr/lib/python3.6/json/encoder.py”, line 180, in default o.class.name) TypeError: Object of type ‘MaxHistoryTrackerFeaturizer’ is not JSON serializable


when i run ‘rasa run’ it gives “No policy ensemble or domain set. Skipping action prediction and execution.” due to which not getting answer from bot.


sion_id":“762b3287e2aa4247bfab97c5c5992ceb”}]‘, rsv1=False, rsv2=False, rsv3=False) 2019-08-16 10:38:12 INFO engineio.server - e7f33a068fba4cd1ab812afbb28f0b74: Received packet MESSAGE data 2[“user_uttered”,{“message”:“hello”,“customData”:{“userId”:“123”},“session_id”:“762b3287e2aa4247bfab97c5c5992ceb”}] 2019-08-16 10:38:12 INFO socketio.server - received event “user_uttered” from e7f33a068fba4cd1ab812afbb28f0b74 [/] 2019-08-16 10:38:12 DEBUG rasa.core.agent - Created a new lock for conversation ‘762b3287e2aa4247bfab97c5c5992ceb’ 2019-08-16 10:38:12 DEBUG rasa.core.tracker_store - Recreating tracker for id ‘762b3287e2aa4247bfab97c5c5992ceb’ 2019-08-16 10:38:12 DEBUG rasa.core.processor - Received user message ‘hello’ with intent ‘{‘name’: ‘greet’, ‘confidence’: 0.9571930170059204}’ and entities ‘[]’ 2019-08-16 10:38:12 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 3 events 2019-08-16 10:38:12 WARNING rasa.core.processor - No policy ensemble or domain set. Skipping action prediction and execution. 2019-08-16 10:38:12 DEBUG rasa.core.agent - Deleted lock for conversation ‘762b3287e2aa4247bfab97c5c5992ceb’ (unused) 2019-08-16 10:38:21 DEBUG websockets.protocol - undefined < Frame(fin=True, opcode=1, data=b’2’, rsv1=False, rsv2=False, rsv3=False) 2019-08-16 10:38:21 INFO engineio.server - ad54899d07a34c3c9506ab7afcb2f774: Received packet PING data None 2019-08-16 10:38:21 INFO engineio.server - ad54899d07a34c3c9506ab7afcb2f774: Sending packet PONG data None


Read more comments on GitHub >

github_iconTop Results From Across the Web

Chat window doesn't work "Waiting for server". Early version ...
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....
Read more >
Request doesn't wait for response in .net - Stack Overflow
The problem is that I can see logs even for large files, so it means that website always returning value, but for large...
Read more >
Why is a Website 'Taking Too Long to Respond' & How to Fix
After encountering the 'taking too long to load' error, a great approach is to rule out the most obvious causes, for example, internet ......
Read more >
Troubleshooting - Visual Studio Live Share - Microsoft Learn
Go to Tools > Options > Live Share > User account to select an alternate account.
Read more >
Unable to Reach Windows Activation Servers - SoftwareKeep
Here's a quick guide on how to resolve Unable to Reach Windows Activation server error and other common activation errors on Windows 10....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found