Summary
Sometimes there is an unread direct/group channel that should be shown in the sidebar as unread (i.e. in bold), but it is not shown there and the messages get missed.
Steps to reproduce
Seen with mattermost 5 (various versions) and confirmed again today on 6.3.7. No known steps to reproduce reliably.
I do not know whether there are any consistent user settings that are always present when this occurs because I have had only had a lot of indirect reports of it. When observing the issue myself, it has been when using channel groups, where the messages should be in the collapsed āDirect Messagesā group but no channel is shown there.
Expected behavior
When someone messages me in a direct/group channel, the channel should appear in the sidebar and be marked as unread.
Observed behavior
Occasionally this fails to happen for a specific direct/group channel. Even when there are more messages later in the same channel, it still doesnāt appear as unread in the sidebar. That situation can persist for hours. In this case the unread messages indicator (e.g. the dot on the app icon) does indicate an unread message, even if the UI shows no channels at all as being unread in the sidebar. This may lead the user to realise that something is not being shown because the UI shows all channels as read, yet the unread indicator on the icon says that something is unread; the user then refreshes the client, and finds an entire conversation waiting to be read.
Refreshing the client resolves the issue and the channel is then shown as unread.
I am guessing this will be impossible to follow up without steps to reproduce it, but maybe a workaround is to have the client periodically do a safety check / re-check of unread channels? Even if that was done once per minute, it would be a lot better than the current situation.
I would say I see this behaviour about once a month, and I have had dozens of other users in the organisation complain about it.
Just an update to say that this is still happening on 7.8.4. Users are increasingly complaining about it and some are suggesting we should move away from mattermost for this reason alone.
If there is anything we can do to help track it down, Iām keen to help. I donāt want to just say āmaybe upgradeā since we have seen this across all version 5.x, version 6.x, and version 7.x upgradesā¦
Joxi (103 kb) Š·Š°ŠŗŠ°ŃŠ°Š½ 24 Š°Š²Š³ŃŃŃŠ° 2023 Š³. Joxi - This is a screenshot of the bug that has been hanging for the second month for me, unread 2 tracks/mentions, but I have no unread posts. iām not a developer of course, but decided to post here with the problem.
Today an empty draft appeared, it is not in the list of drafts, I closed the page with MM, opened it again - nothing changes.
Hi Andy, thanks for following up on this issue! It sounds frustrating, and I appreciate your patience. A client refresh often resolves it temporarily, but for a more consistent fix, I recommend reviewing this documentation on sidebar settings to ensure the settings are optimized for your use case, and consider updating to the latest Mattermost version if you havenāt already. Let us know if we can assist further!
I am online as normal; all channels are fully read
I go offline (close laptop etc)
At some point while offline, someone creates a new group message or private channel that has me in it
I come back online, and lots of unread channels are shown in the sidebar (but the new group/private channel is not shown as unread, and maybe is in a collapsed group)
I read all the unread channels - now the sidebar shows nothing unread
ā¦but there is a number in the red circle in the title bar, indicating that there are still unread messages
This happens regularly enough that I recognise it. I know that refresh will cause the unread channels to appear in the sidebar. Recently I also discovered that simply collapsing/expanding a channel group in the sidebar is also enough to make the unread channel appear in the sidebar. Maybe that helps to diagnose where it is going wrong?
I donāt understand what you mean about the sidebar settings - not sure what any changes to the settings would avoid this bug?
Because I am a user who likes to mark everything as read, I get the fallback indication from the unread messages indicator in the title bar; users who leave lots of channels marked unread by default do not get that fallback and they are much more concerned.
This is still the most common complaint about mattermost at my workplace. Surely there is some information that could be captured next time we see that we are in the broken state (sidebar showing nothing unread, but the unread indicator at the top showing that there are unread messages)? I could get screenshots but I am not sure they add anything beyond the description. Is there any datastructure in the webapp that we could dump? I believe that in every case in which I have seen this, it has been on a new channel created while I was offline - a new group, a new private channel, or maybe a new conversation with another user with whom I have not chatted before (which internally does mean a new direct channel has been created as I understand it). This doesnāt mean it is reproducible every time but I think this must help to narrow it down? Seems that there is some request to the server to list channels that is being missed, or maybe that query is failing when I open up my laptop (maybe during a messy period of getting networking reconnected) and is not retried? Or maybe the new channel is known and itās a display bug with the collapsed channel groups (given that simply collapsing a different channel group causes it to appear)?
I would really appreciate it if the developers could look at this since it has been a troubling bug for several years now. Happy to participate and help out with gathering information on our side if it helps.
The very first thing I have to suggest is to upgrade to 9.11.6 as itāll include a few months of bug fixes. I donāt see anything immediately that looks like, āAh, ha! Hereās the answer!ā but itās highly recommended.
@gubbins The issue was indeed detected and reproducible for us in a clustered environment. However, the fix changes the websocket to propagate directly to the users that need to be notified instead of relying in channel memberships. This should make the notifications of being added to the GM/channels more robust overall. I would still recommend upgrading to v9.11.4 regardless if HA environment or not.
OK - we will try an upgrade to 9.11.6 and see if it happens again!
I do suspect, though, that the client has already received the information, because:
It does show the unread icon, for example the dot on the mattermost icon in the macOS task bar, or the number in the red circle in the title bar of the desktop app; the client is apparently well aware that there is unread content, so does this mean that it already got the websocket events it needs to?
The unread channel is shown properly in the sidebar as soon as I collapse or expand a channel group. I would be surprised if that action would, on its own, cause client-server interaction that results in a new unread notification being sent from the server to the client? It seems to me that in this case, again, the client already knew about the unread channel.
If Iām right about those then itās simply a display bug: the sidebar should show the channel name in bold, but doesnāt, until something gives it a kick such as a collapse/expand operation, or a full refresh.
Today we did an experiment to reproduce this issue. We successfully reproduced the problem in both 9.11.6 (on our dev server) and 9.11.1 (on our production server).
Steps taken:
Run desktop mattermost client on mac
Turn off wifi and close laptop
After a few minutes, have a colleague create a couple of new channels (one public, one private), add me to them, and post in them
After another few minutes, open laptop and reconnect wifi
Wait a while for client to reconnect etc
Browse channels, switch channels, navigate as normal until all channels are marked as read in the sidebar
At this point:
There is an unread message count in the title bar of the client
ā¦but the sidebar does not show any unread channels
Now either refresh the client, or just collapse or expand one channel group in the sidebar
After a brief pause, the unread channels are now properly shown in the sidebar.
See some partly-redacted screenshots from the 9.11.6 server below.
Screenshot below shows the state after reading all unread channels, browsing around, etc. Note: unread post count at the top, but, no channel shown as unread in the sidebar. There should be unread channels in the āChannelsā group but itās empty. From past experience, this situation can persist for hours.
Screenshot below shows the state following the above screenshot, after one more action which is simply collapsing the āFavoritesā channel group. Note: the unread channels now appear correctly in the āChannelsā group. It doesnāt matter which group we collapse or expand, it seems to always have this effect. A refresh of the client would also cause them to appear.
ā¦and finally, a reminder that this also happens with direct messages (from people you havenāt talked to before in mattermost) or new group channels.
@gubbins apologies for the late reply as I was out during the holidays.
Thank you for the detailed steps to reproduce this issue! Iāve opened a new issue to investigate this further and hopefully have a solution that also covers this case. Jira if you want to follow.
gubbins Weāve determined we have already a fix for this issue in v10.3 but we are now backporting this to v9.11 ESR as well. This will be available in the next v9.11 dot release, likely in v9.11.8.