bug: Attachments not downloadable on Android — file URL becomes "content://net.demola.chat.android.provider/files/<filename>"

Open
#6,726 10 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, react-native, typescript
Domain
mobile

Research direction

No file or test is named. Start by tracing the Android attachment open/intent flow and the FileProvider configuration that produces content://net.demola.chat.android.provider URIs. Done means image, audio, DOCX, PDF, and text attachments can be opened or downloaded successfully on Android.

Written by the indexing model from the issue text.

Description

🐛 bug
Describe the Bug

On Android, tapping any file attachment in a room/thread fails to open or download. I tested image, audio, DOCX, and PDF files with the same result.
When I tried a .txt file and chose “Open in browser,” I saw the attachment resolves to a content URI:

content://net.demola.chat.android.provider/files/<filename>

This is an Android content URI (not an http/https web URL). The app/intent flow appears to pass a content:// URI that external apps can’t open—likely due to missing temporary read permission or a FileProvider configuration/authority issue—so the attachment never opens.

Steps to Reproduce
  1. Open the app on Android and enter any chat.
  2. Tap an existing file attachment (e.g., PDF, image, doc), or upload a new one and then tap it.
  3. Choose the app to open the file
Expected Behavior
  • Tapping an attachment should open it in a suitable viewer or download it successfully on Android.
Actual Behavior
  • The file open/download fails.
  • The file URL displayed/resolved is: content://net.demola.chat.android.provider/files/<filename>
  • Android cannot open it (launched fails to open / images stay loading forever)
Rocket.Chat Server Version

7.9.3

Rocket.Chat App Version

4.65.0.107519

Device Name

Samsung Galaxy M35

OS Version

Android 15

Additional Context

No response

Dominant language
TypeScript
Stars
2.4k
Forks
1.5k
Avg merge
1d 15h
Merged PRs (30d)
29

Getting set up

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.ReactNative

All issues in RocketChat/Rocket.Chat.ReactNative

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.