Encrypted files cannot be downloaded repeatedly from the Room Files menu

Open
#43,675 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Sakshamlabs is already working on this.

Since Nov 12, 2026.

  • #43678 by @Sakshamlabs — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
typescript
Domain
frontend

Research direction

Start with the FileItemMenu component and trace how it registers the response listener and reuses the request ID for encrypted downloads. The issue suggests creating a listener per request with a unique ID; check the related response handling and tests. Done means repeated downloads of the same encrypted file each trigger successfully without remounting the component.

Written by the indexing model from the issue text.

Description

type: bug
Description

Downloading an encrypted file from the Room Files menu works for the first request, but subsequent download requests can fail to trigger the download.

The response listener is registered when the FileItemMenu component mounts and uses a one-time listener. Once the first download response is received, that listener is consumed. If the component remains mounted, later requests reuse the same ID, but there is no longer an active listener waiting for the response.

Steps to reproduce
  1. Open a room and navigate to the Files section in the contextual bar.
  2. Select an encrypted file.
  3. Open its menu and click Download.
  4. After the first download completes, open the menu again.
  5. Click Download again.
Expected behaviour

Every download request should be handled independently, allowing the same encrypted file to be downloaded multiple times without reopening the room or remounting the component.

Actual behaviour

After the first response consumes the one-time listener, subsequent responses may not trigger the download.

Suggested direction

Register a response listener for each download request and use a unique request ID to match each response to its corresponding request.

Dominant language
TypeScript
Stars
46.5k
Forks
14.1k
Avg merge
1d 21h
Merged PRs (30d)
381

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from RocketChat/Rocket.Chat

All issues in RocketChat/Rocket.Chat

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.