RocketChat / RocketChat/Rocket.Chat

Joining a channel with a user without any role fails without proper error message

Open
#28,848 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description:

A user without any role can be joined to a channel. The user can log in and will see the channel, but trying to open it will fail. The UI does not show any message to the user. The user will not know what's going on.

Steps to reproduce:
  1. Using an admin account, create a new user, but do not assign any role. (Alternatively, you can use an existing user and remove all their roles.)
  2. Ensure that this user is joined to at least one channel.
  3. Log in with the new user.
  4. Try to open the channel.
Expected behavior:

Either the channel can be opened or an error message is shown explaining that the channel cannot be opened and why.

Actual behavior:

The channel is partly opened, but the UI gets stuck somewhere in the process, leaving the user with an empty message pane and a greyed out message box:

image

Server Setup Information:
  • Version of Rocket.Chat Server: 6.1.1
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • MongoDB Version: 6.0.5
Client Setup Information
  • Browser Version:
    • Chromium Version 112.0.5615.49 (Offizieller Build) Arch Linux (64-Bit)
    • Firefox 111.0.1 (64-bit)
  • Operating System: Arch Linux
Additional context

This problem was already reported in https://github.com/RocketChat/Rocket.Chat/issues/28335 for direct messages, but it was closed soon thereafter.

Relevant logs:

The browser's development console shows a set of "Uncaught (in promise)" error messages, strengthening the impression that this is a bug:

image

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

Reproduce the issue by joining a user with no roles to a channel, logging in as that user, and opening the channel; inspect the browser development console for the uncaught promise errors. Trace the channel-opening flow from the UI behavior described, and consider the issue complete when the channel opens or the user sees an explanatory error instead of a stuck empty message pane.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authorization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.