Switching to unread channel displays arbitrarily old messages

Summary

Switching to a channel with unread messages displays historical chat instead of scrolling directly to the oldest unread message.

Steps to reproduce

  • Use the mouse to select a channel with unread messages.
  • Alternatively switch to a channel with unread messages by using the quick channel switcher accessed via Command+k.
  • After the channel switch occurs, observe the contents of the channel’s message display and compare to the results listed below under expected vs observed behavior.

Additional notes:

  • This occurs for channels where you just read the newest message seconds ago.
  • This occurs for public and private channels as well as direct messages.
  • This occurs with Mattermost desktop client v4.4.0 and server v5.19 (it occurred on prior versions as well).
  • This issue does not always occur on every switch, but is frequent enough to impact productivity.

Expected behavior

When switching to a channel with unreads, the window should scroll down to the oldest unread message for your initial view.

Observed behavior

Sometimes when switching to a channel with unreads, the window will display chat messages which have already been read several days ago. The top of the message window includes three animated horizontal loading dots and no subsequent change occurs until you take action. At this point you can scroll down to reach the unread messages or apply the workaround referenced below.

Partial workaround

Jumping out and back into the channel displays the newest message as all messages are now considered read. This is accomplished using keyboard shortcuts of Command+[ followed by Command+].

@sudheerDev Do we know if this behaviour has improved since v5.19 or if there is a ticket open for further improvements?

@amy.blais I don’t think there are any improvements. I don’t see any ticket but i see a github issue similar to this https://github.com/mattermost/mattermost-server/issues/13422. i couldn’t repo this so far to get to the root of the problem.

Another report: Channels jumping back in time

Here the behaviour changed after upgrading the server Linux distribution and Mattermost. We are now running nginx 1.14.2, Mattermost 5.20.1 and the channels do not jump back in time anymore. However, they get stuck in “Loading…” in the same situation when they would have been jumping earlier. In Chrome developer console these two Fetch rows seem to be in infinite loop. Or maybe not infinite, in this case it completed after they reached some 180 attempts and the channel content was shown.

We fixed an issue related to channels getting stuck at “Loading…” in v5.20.2 dot release. Would you be open to upgrading?

Upgraded to 5.21.0, that should include the same fix I guess. Will let you know how it works in the coming days.

1 Like

Nope, not fixed. Cleared the caches and restarted browser after Mattermost upgrade, same behaviour. Unread channels randomly get stuck in “Loading…”, waiting and letting them do some 200 cycles of those POST/GET fetches or switching to another channel and back fixes it.

By the way, it still occurs only on Chrome, mobile client at least is unaffected and Safari at least used to be unaffected. I will test for a while with Safari to confirm.

There’s a firewall device between the users and the server by the way, a Juniper SRX with default timeout values. It does allow all the traffic, but it does kill idle sessions after timeout. That could be related or then not.

@stnz Could you try chrome again with a change in zoom level? Like go to 125% and try?

Can you also tell me your screen resolution?.

Thanks very much for all the responses and relevant links! Hopefully we can isolate the root cause and resolve it permanently.

I’ll try using firefox/safari as an alternative. The main feature I am missing in that scenario is the very useful desktop option: “Show Mattermost icon in the menu bar” which greatly assists indication of messages with the red vs blue dot.

There is only one difference we had to specifically do for chrome https://github.com/mattermost/react-window/blob/f8b7c8333c3c8e80f0fc80b95c45c56361b26253/src/createListComponent.js#L195 because of an issue with optimisations chrome internally does. I have to check back if it is fixed.

What version are you on @LittleBobbyLikesChat. I can give a custom build with the fix on top of your existing version. If you @stnz or you are interested in verifying it.

I can try the zoom, will let you know the result. Screen resolution varies, we see this problem on multiple computers, users and resolutions.

By the way, now I have been using Safari during the evening and don’t see the problem occuring, so… I assume it’s still Chrome only.

Same here, I do not encounter the issue using Firefox. It does occur for many users on many different machines.

@sudheerDev - we can explore a custom build, our mattermost expert can get in touch to sort it out.

One more help, Can either of you try Turning off smooth scrolling in chrome://flags/. Change from default option to off to see if that fixes?

I can try to build too. Maybe a bit too early for conclusions as our chat is rather quiet in the evenings, but I haven’t seen the problem occuring yet after setting Chrome zoom to 125%. Tomorrow I should see if it still keeps occuring.

From an affected user:

I have the issue on web browser at 90% on 1080p and 1440p monitors

Yea I had 90% too, guess it’s Chrome default.

Yep, seems like it works now with zoom set to 125%. Haven’t seen the problem occuring even once.

Workmate mentioned he is also seeing the same problem on the desktop client, but that’s also using Chrome engine?

Wow amazing. I used Mattermost Desktop all day with the zoom level increased a notch - the problem never occurred!!