RocketChat / RocketChat/Rocket.Chat

Roles.findUsersInRole(...).toArray is not a function when registering new user

Open
#23,880 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

After inviting new users through their email adress, when they register a new account they get the error 'Roles.findUsersInRole(...).toArray is not a function'

Steps to reproduce:
  1. go to adminstration/users/invite, send a registration email
  2. let the user register themselves using the link provided in the registration email
    3.User fills in all fields, receives the error and cannot proceed
Expected behavior:

User should be registered after filling in their details

Actual behavior:

Roles.findUsersInRole(...).toArray in a red textbox in upper right corner

Server Setup Information:
  • Version of Rocket.Chat Server: docker image rocket.chat:4.2.0
  • Operating System: Linux red hat
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: docker mongo:4.4 ?
  • NodeJS Version:
  • MongoDB Version: mongo:4.4
Client Setup Information
  • Desktop App or Browser Version: Chrome
  • Operating System: Windows 10
Additional context

using docker image rocket.chat:4.1.2 resolves the issue

Relevant logs:

running 4.1.2 now, can reproduce if required.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the invited-user registration flow described in the issue on Rocket.Chat 4.2.0, then compare it with 4.1.2, where the reporter says the problem does not occur. Done means an invited user can complete registration without the Roles.findUsersInRole(...).toArray error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.