Rocket.Chat's Community Open Call 🎤 Jan 19th, 2022 Join us!

Not sync at livechat page

Description

Open the chat window at http://ip:3000/livechat. After the first message is sent, all conversations are not displayed, it could be displayed at Agent side, including own message and the Agent’s reply message. After the page is refreshed, all conversations can be displayed.

Server Setup Information

  • Version of Rocket.Chat Server: 4.2.2 and 3.9.0 and 3.7.1
  • Operating System: centos 7.6
  • Deployment Method:
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version: v12.22.8
  • MongoDB Version: 5.0.5
  • Proxy:
  • Firewalls involved:

Any additional Information

WebSocket connection to ‘ws://192.168.0.224:3000//websocket’ failed: Connection closed before receiving a handshake response

WebSocket is already in CLOSING or CLOSED state.

Uncaught (in promise) DOMException: Failed to execute ‘send’ on ‘WebSocket’: Still in CONNECTING state.

Hi! I was not able to reproduce this error :frowning:

I installed Rocket.Chat with docker, and went to, in my case, http://192.168.1.20:3000/livechat

Check that “ip” (in your case 192.168.0.224, i guess) must be configured at the ROOT URL (Admin > General). I have found that sometimes, while changing this config, is good to restart the server to livechat external ip to take effect in the script.

Also, in Admin > Omnichannel > Livechat > Livechat Allowed Domains must be properly configured, or blank to allow all.

Are you running this locally?

While this is probably not a deployment issue, I always suggest to use docker or any container deployment method, in order to avoid any kind if dependencies troubles.

Dudanogureira, thank you.
I just install the rocket chat follow: https://docs.rocket.chat/quick-start/installing-and-updating/manual-installation/centos
Create a admin account with setup wizard
Then setup the admin account as Omnichannel Agent, other settings are not configured.
The SITE URL is: http://192.168.0.224:3000/
The “Livechat Allowed Domains” is empty
I’m running it locally and restart the server several times.

It’s a really confusing situation :worried:

1 Like

That’s a nasty config problem. Just reproduced myself now.

And here was the clue, in front of us, all the time:

ws://192.168.0.224:3000//websocket

So, for posterity, ADMIN > GENERAL > Site URL should not have the trailing slash.

it should be:
http://chat.myawesomeproject.com

not:
http://chat.myawesomeproject.com/

Hi, Dudanogueira, the issue resolved by remove the slash. thanks for your support so much.

1 Like