[Solved] New messages do not appear until refresh


New messages in the currently watched channel or private message do not appear unless a) manual refresh b) channel switch c) wait for some minutes.
Other topics with similar issues did not provide a solution to this issue.

Steps to reproduce

Watch a channel. Let someone post a message into that channel. You can also try it with private messages, the issue is the same.

Expected behavior

The new message appears without delay.

Observed behavior

The new message does appear only after a manual refresh, after waiting a real long time (several minutes) or typing a message yourself (I guess this triggers a refresh). Logs (put on debug level) do not show anything related or otherwise noteworthy. Browser network console shows a successful websocket GET request with 101 return code and no errors. Push notifications work as desired.
Tested on current Firefox, Desktop App and iOS mobile app, all showing the same behaviour. The issue first appeared after upgrading to 5.0 and persisted through all updates until 5.6 which we are using now.

1 Like

I made a little progress here. Clearing the siteUrl helped. Now I have a different problem, request origin not allowed by Upgrader.CheckOrigin. If I enter our domain in the cors allowed domains it works from our laptops, but not from our phones over the public internet.

After about one hour the issue reoccured, now even with cleared SiteURL new messages are not displayed without manual refresh

Hi @m.schwarz,

One thing I can think of is that this could be a network issue, have you also tried with different networks or tried changing the network?

1 Like

I have no access to the network configuration of the machine running mattermost, so no, didn’t try that. I reached out to the people responsible for the network to make sure there is no other proxy, firewall or whatsoever involved which might be misconfigured but got no response yet.

The problem was indeed the WAF module of the F5 sitting in front of the server. The websocket profile was missing there, so websocket requests got resettet instantly. Strangely it worked for quite a while and did so every now and then for some time but that’s the business of the networking people.