-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: User Presence Status not updating on Windows Desktop Client #2785
Comments
JIRA ticket: https://mattermost.atlassian.net/browse/MM-54736 |
I would like to add that I have recently had the same problem with multiple installations of the Mac app. |
@laborb-sb As a sanity check, the user isn't set to Offline manually are they? If you manually set them to Online and refresh does the same issue occur? |
Correct.
|
@laborb-sb Is it only one user that's affected? Or is this happening to multiple users? |
To multiple user, but not every user. |
I am observing the same problem as @laborb-sb but on two different Windows 10 machines, since the upgrade to version 5.9.0. After starting the desktop client the user is offline. When setting it manually to online, then restarting the client the users presence will again be set to offline. |
Looks a bit like this issue (github) to me. I can also reproduce it in Firefox and Chrome. Sometimes the presence is online after login, but after one or two page reloads the user appears offline again. |
This is likely the case, that issue we'll be looking at in the coming months as part of an overview of the status system |
In a small survey, 10 out of 12 users told me that the online status is NOT set automatically. Two of them seem to have no problems. But to note again: the use in the browser (Webapp) or iOS app works without errors. |
I'm also using 5.9.0 on Windows, was doing some unrelated things in local, and found two bugs which I think could help troubleshooting this. I believe part of the problem could be here: desktop/src/main/preload/externalAPI.ts Line 482 in ddecc42
When it's called from desktop/src/main/app/initialize.ts Line 459 in ddecc42
The wrong number of arguments is expected in the externalAPI.ts, the value of idleTime is used in place of isSystemEvent. I believe this could potentially trigger a status that would be considered as manually set. (as long as the idleTime > 0) I wasn't able to reproduce it with my current local configuration, but with a remote server (with a reverse proxy), yes. I'm not sure if this is related, but I've seen that a lot of websockets are ending in error with the remote server (unexpected EOF), which doesn't happen with my local configuration. The websocket EOF would cause the offline status update to execute everytime the connection is dropped. Hypothetically, I suppose that somehow the status cache returns an error, the code above incorrectly sets the status as manual, which causes this line to be executed: I believe it could be a combination of 1+2, 2+3 or just 2, but I lack time to properly test it out right now. Hopefully this helps! |
I ended up having a deeper look into it. Server version is 9.11.1. I think the user presence status is unstable in both the webapp (v9/v10 but not v10.1) and desktop app at the moment. There is a race condition happening upon querying the user's status at two spots:
The bug appears when the response to the HTTP request departs before and arrives after the WS status_changed event with a returned status of offline and manual set to false. Testing on the community.mattermost.com server (v10.1.0) with the reproduction steps below, the bug pops up but the user only remains as offline for a few seconds until there's another call to the endpoint mentioned above, done in the status_profile_polling.ts. It's a new 10.1 feature, so I believe upgrading would help with this problem. Reproduction steps:
It is also reproducible with Fiddler thanks to the AutoResponder feature with a high latency for this response (1000ms is enough usually). The Reset status modal should probably just wait for the WS status_changed event instead of manually querying the status, but I unfortunately don't know React or the app well enough to reliably fix this, sorry. Add the inconsistency of the USER_ACTIVITY_UPDATE event handling shown in my first message above, plus the fact desktop/src/main/UserActivityMonitor.ts Lines 120 to 125 in ddecc42
|
Thanks for the additional insight @Canardlaquay! Going to add this to the JIRA ticket and investigate the race condition you've described. |
Before you file a bug report
Mattermost Desktop Version
5.4.0
Operating System
Windows 10
Mattermost Server Version
7.10
Steps to reproduce
Expected behavior
Observed behavior
Log Output
Additional Information
Discussion thread on the Community Server here
Skype for Business clients on the same workstations have the expected behaviour of switching the status to away/offline.
Issue does not occur via the webapp (Chrome)
Trying on personal Windows workstations does not reproduce the issue.
The text was updated successfully, but these errors were encountered: