Skip to content
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

Can not add user to chanel #24673

Closed
redRolf opened this issue Mar 2, 2022 · 11 comments
Closed

Can not add user to chanel #24673

redRolf opened this issue Mar 2, 2022 · 11 comments

Comments

@redRolf
Copy link

redRolf commented Mar 2, 2022

Description:

When trying to add a user to a channel, only a subset of 10 users is offered for selection.

Steps to reproduce:

  1. create a private channel (the behaviour is not limited to private chanels, this is just as an example)
  2. go to the user members menu
  3. click on Add
  4. Search for a user (only a subset 10 users will be displayed)

The same behavior can be observed when creating a new channel and trying to add a new user in the channel creation menue.

In both cases, the following request is sent to the server: https://<your-endpoint>/api/v1/users.autocomplete?selector=%7B%22term%22%3A%22%22%7D

This then only returns a subset of all users. That can be reproduced with the curl command below:

curl  -H 'X-Auth-Token: <your-token>' \
      -H 'X-User-Id: <your-id>' \
      -H "Content-type: application/json" \
      'https://<your-endpoint>/api/v1/users.autocomplete?selector=%7B%22term%22%3A%22%22%7D'

I suspect, that the cause may be this merge: #24529

Expected behavior:

  • All users are displayed and or can be searched for

Actual behavior:

  • Only a subset of all users can be selected.

Server Setup Information:

  • Version of Rocket.Chat Server: 4.5.0
  • Operating System: Docker (FCOS Host)
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: -
  • NodeJS Version: v14.18.3
  • MongoDB Version: 4.4.12 / wiredTiger (oplog Enabled)

Client Setup Information

  • Desktop App or Browser Version: Google Chrome 98.0.4758.109
  • Operating System: MacOS

Additional context

I am happy to provide any information that may be required. I have tried to limit the info here to what seemed relevant. 😇

Relevant logs:

@Bengrunt
Copy link

Bengrunt commented Mar 3, 2022

We experience the same issue with our 4.5.0 instances, with Mongo 5.0 (if that changes anything which i doubt).

@redRolf
Copy link
Author

redRolf commented Mar 3, 2022

@Bengrunt a temporary workaround is to:

  1. Create the channel as intended, but not add anyone.
  2. Add the desired people by sending the slash command: /invite @username

This works for public and private channels :)

@Bengrunt
Copy link

Bengrunt commented Mar 3, 2022

@redRolf Yes, that's what I told my users :)

By the way, the issue affects discussions and direct messages as well.
While the workaround mentioned by @redRolf works for discussions, it will not for direct messages since you can't create them.
Resorting to "temporary" private channels seems to be the only alternative.

@TimmiORG
Copy link

TimmiORG commented Mar 3, 2022

This should be something for 4.5.1 as this a quite basic feature which is heavily used.

@catalins95
Copy link

Hello
You have the same issue as me #24712
Possible fix by #24328
Try this fix please 😄 ❤️ and tell me if it is working.

On monday I will try it too.

Let me know please if u could solve it.

Best Regards,
Catalin.

@daniel-jettka
Copy link

By the way, the issue affects discussions and direct messages as well. While the workaround mentioned by @redRolf works for discussions, it will not for direct messages since you can't create them. Resorting to "temporary" private channels seems to be the only alternative.

Temporary workaround for DMs: go to top menu "Directory", search for user, click on user entry - this will open a DM "channel"

@dudanogueira
Copy link
Contributor

dudanogueira commented Mar 10, 2022

We have users in forums with the same error that sad it was fixed in 4.5.1

Can you guys confirm?
https://forums.rocket.chat/t/add-members-broken-in-4-5-0-can-only-see-the-first-10/13528/2

@TimmiORG
Copy link

Confirmed, working for me again with 4.5.1.

@amottier
Copy link

It is working again but, when trying to add a user, I get immediately (i.e. without any latency) a list of suggested users to add, if I start typing it will first filter users from this list and when my search no longer match a user in this initial list it displays "None" briefly (but feels not that brief), then "Loading" briefly and only then I get the user I was looking for. I would say that "it is working" but user experience is not perfect.

@billynoah
Copy link

@amottier - that was my experience as well. It was reasonably fast to autocomplete but would be nice if there was a "Loading" message or something while it was performing the request, e.g., https://select2.org/data-sources/ajax

@dudanogueira
Copy link
Contributor

Great feedback @amottier! Thanks!

As you probably know, we are refactoring a lot of components, and those nasty bugs are expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants