RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.51k stars 10.55k forks source link

Status is not updating #26820

Open makleng8895 opened 2 years ago

makleng8895 commented 2 years ago

When the status "Online" is clicked, the status does not update. The same is true with other statuses.

Video reference: https://watch.screencastify.com/v/Oz6Wzlgdf3fFs3agOYUp

HrHeun commented 2 years ago

I'm experiencing the same/similar problem on my server with the difference that when you refresh the page you see the changed status. It looks like the status is changed on the server but not displayed until you refresh the page.

debdutdeb commented 2 years ago

Please fill the issue template - we can't help without having the full background 🙂

yasemincidem commented 2 years ago

I tried to reproduce the issue on my local. It seems to be working. Can you check if it works on your side now ?

SchaeVHS commented 2 years ago

I can confirm this bug.

There is a POST request to POST https://xxxxx/api/v1/users.setStatus, with a json content of

{"status":"busy","message":""}

The answer is:

{
"success":false,
"error":"Change status is not allowed [error-not-allowed]",
"errorType":"error-not-allowed",
"details":{"method":"users.setStatus"}
}

My permission settings deny custom status (aka Accounts_AllowUserStatusMessageChange). This seems to trigger the bug in https://github.com/RocketChat/Rocket.Chat/blob/f0c37c5a8c904181577b80d239255284ac6a1280/apps/meteor/app/user-status/server/methods/setUserStatus.js#L22

HrHeun commented 2 years ago

I did some further testing about this issue. I previously ran multiple instances which seems to get an enterprise-only feature in the future (https://docs.rocket.chat/quick-start/scaling-rocket.chat/running-multiple-instances note the Enterprise Tag). So I switched back to one instance, but the refresh problem still occurred.

Then I removed the replicaSet information in the env-variables for mongo and now everything seems to work as intended.

Are multiple instances still a working community feature? The broadcast-message in #26830 is a bit worrying.

pauloriply commented 2 years ago

I did some further testing about this issue. I previously ran multiple instances which seems to get an enterprise-only feature in the future (https://docs.rocket.chat/quick-start/scaling-rocket.chat/running-multiple-instances note the Enterprise Tag). So I switched back to one instance, but the refresh problem still occurred.

Then I removed the replicaSet information in the env-variables for mongo and now everything seems to work as intended.

Are multiple instances still a working community feature? The broadcast-message in #26830 is a bit worrying.

For what you removed replicaSet from connection string? I see strange behaviour after we delete one of two instance of rocket chat (because it’s Enterprise feature only) and have not idea why(