User Presence Shows Logged in after Log Out

Description

We have many users who’s presence seems to get stuck. Although they log out, they remain as available and logged in. Restarting Mongo and Rocket.Chat will clear this issue, but after many days of running it will once again get stuck. Does anyone else experience this and if so, is there a solution?

Server Setup Information

  • Version of Rocket.Chat Server: 0.71.1
  • Operating System: Linux
  • Deployment Method: Manual Install Tar
  • Number of Running Instances: 8
  • DB Replicaset Oplog:
  • NodeJS Version: 8.12.0
  • MongoDB Version: v3.6.5
  • Proxy: Apache
  • Firewalls involved: None

I got the same issue in latest version 1.0.3 (snap).

Have you found any solution yet @newbie2019? Restarting services seems to work but only for a few weeks.

You shouldn’t need to restart both mongo and Rocket.Chat. Just restarting Rocket.Chat should do the trick. This is typically an issue of some client not handling session right. What clients do you use with any of the users that get stuck?

I’d also recommend taking a look at 1.1.x some presence issues were fixed there.

@aaron.ogle - Yes, we will be updating in the next month or so. I will try just restarting RC service and see if it works.

1 Like

I restarted both mongo & rocket.chat but not Ok, user still show status online. This issue is auto solved within 24 hours.

as suggested above please make sure to update to 1.1.x where the issue should be solved.

My side auto updated to 1.1.x. Thank you so much !

Hi aaron.ogle,

I found this issue will happen if 2 accounts use one browser on one computer together, I mean the first account has already log-out after used & then the second account log-in the same browser on the same computer, this issue will happen (the first account will get stuck online).

Please double check it. Thanks

We had the exact same issue, but it resulted from rebooting the server while clients were connected. I had to manually delete the stuck sessions in MongoDB.

Is there a refresh happening or anything between logins?

What version of mongo and Rocket.Chat?

MongoDB v. 3.6.13
Rocketchat 0.74 back then.

Now we’re running 1.1.1 and we’re facing completely different problems :frowning:

Ok so updating solved that issue like it should :+1:

Only logout and re-login with another account on the same browser.
Thanks.

I need to be able to have two separate accounts on the same server, and need to be able to get offline email notifications. The problem is that on Chrome, you stay “online” in both accounts even when you log out of one. This means you need to completely shut all tabs along with the browser and re-open. Is there a way to fix this @aaron.ogle ? Thank you!!

(Running snaps Rocket.Chat Server 1.1.3 with Linux OS)

I think you are using iframe and logout using api , that incorrect. so you need to use rocket chat iframe commands

I noticed related issue with my fresh instance of Rocket Chat - snap 3.2.2. I noticed problem with mobile clients - every time, when user minimizes app on his device, the status immediately changes to away, what is ok, but after ca. 40 sec it goes to offline. Even back app up do not changes status back to online - it still remains offline. Manual change to (in app) to online brings green dot, but as soon as user minimizes app, whole history repeats - first go as away, after ca. 40 sec goes oflline. I must mention, that even user is offline (has offline status), he receive push notifications. In my opinion this is bug, because if user has possibillity to receive push, he is online in some way so he should has “away” status all the time. Offline status suggests, that user is not connected to server and won’t receive any notifications at all. Please fix that.