RocketChat / RocketChat/Rocket.Chat

Direct file download breaks interface

Open
#31,214 3 comments 4 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:

Hello,

We've come across an issue on Rocket.Chat's desktop client. Here's the scenario:

  1. User A uploaded a file on an open channel
  2. User A copies the URL of the uploaded file
  3. User A sends this copied URL to User B
  4. User B tries to access the file using the URL in their Rocket.Chat's desktop client
  5. Instead of the file being downloaded, User B gets "The page does not exist or you may not have access permission" error with an option to go to the Homepage
  6. Interestingly, if User B uses the keyboard shortcut Ctrl+R, the file starts to download

The expected behavior is that the file should be successfully downloaded as soon as User B opens the URL.

Steps to reproduce:
  1. Upload a file in an open channel
  2. Copy this file's URL
  3. Send this URL to another user
  4. The second user tries to open the URL on their Rocket.Chat's desktop client
  5. Observe that instead of the file, an error message appears
  6. Use keyboard shortcut Ctrl+R
  7. Observe that the file starts downloading
Expected behavior:

The direct URL link to the uploaded file should directly trigger the download process instead of showing any error message. The manual use of the keyboard shortcut Ctrl+R should not be a necessary step to start the download.

Actual behavior:

Every time a direct file download is attempted, the interface breaks leading to the error message "The page does not exist or you may not have access permission" despite the user having the required access permission, and it's only after using Ctrl+R that the file starts downloading.

Server Setup Information:
  • Version of Rocket.Chat Server: 6.5.0
  • Operating System: Linux
  • Deployment Method: Docker
Client Setup Information
  • Desktop App or Browser Version: RocketChat.Electron 3.9.9, 3.9.10, 3.9.11; Google Chrome 119
  • Operating System: Windows 10

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

No source files or tests are named. Start by reproducing the direct uploaded-file URL flow in the Electron client and compare the initial navigation with the Ctrl+R behavior; done means the file downloads immediately without an error page or manual refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript, typescript
Domain
desktop
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.