# Android App (v4.78.0) fails to download/open PDF files with "Error while downloading file" despite working fine on Web & Desktop

**URL:** <https://forums.rocket.chat/t/android-app-v4-78-0-fails-to-download-open-pdf-files-with-error-while-downloading-file-despite-working-fine-on-web-desktop/23065>\
**Category:** Community Support\
**Tags:** android, mobile, rocketchat-apps, docker\
**Created:** [November 3, 2026, 8:28pm UTC](https://forums.rocket.chat/t/android-app-v4-78-0-fails-to-download-open-pdf-files-with-error-while-downloading-file-despite-working-fine-on-web-desktop/23065 "2026-11-03T20:28:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alk](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@alk](https://forums.rocket.chat/u/alk)\
**Post date:** [November 3, 2026, 8:28pm UTC](https://forums.rocket.chat/t/android-app-v4-78-0-fails-to-download-open-pdf-files-with-error-while-downloading-file-despite-working-fine-on-web-desktop/23065/1 "2026-11-03T20:28:16Z")

</div>

Hello Rocket.Chat community,

I am facing a persistent issue with the official Android mobile application (v4.78.0) where downloading or opening PDF files fails immediately with the error **“Error while downloading file”**.

**Environment Details:**

- **Server OS:** Ubuntu host running via Docker

- **Rocket.Chat Version:** 8.9.0

- **Reverse Proxy:** Traefik (with valid Let’s Encrypt SSL, full certificate chain verified, `Verify return code: 0`)

- **Mobile Client:** Official Rocket.Chat Android App v4.78.0 on Samsung S25 Ultra (Android 17 / One UI)

**What works:**

- Downloading and viewing PDFs works perfectly fine on Windows Desktop App, desktop browsers, and mobile Chrome browser (both via Wi-Fi and 4G/5G).

- `curl` requests to the file URL return `HTTP/1.1 200 OK` with proper headers (`Content-Disposition: inline`, correct `Content-Type: application/pdf`).

**What we have already tried / checked:**

- Disabled `Protect Uploaded Files`, `Restrict files to rooms' members`, and JWT/CSP restrictions in Workspace Settings.

- Added Traefik middleware to strip unwanted `Content-Security-Policy` headers and forced `Content-Disposition: inline`.

- Tried clearing local server cache and clearing app data on Android.

- Tested on both mobile data (4G/5G) and Wi-Fi.

- Even tested via the official Android app, but the native client fails to download/preview the file (no network request hits Traefik/server at all when triggered from the chat stream).

It seems like the native React Native / Expo FileSystem downloader on Android 17 fails to handle the file storage interaction or stream negotiation. Has anyone encountered this or found a workaround for Android clients?

Thank you for your support!

### Server Setup Information

- Version of Rocket.Chat Server: 8.9.0
- Operating System: Ubuntu Linux (Docker Host)
- Deployment Method: Docker Compose (Traefik + Rocketchat + MongoDB)
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled (Standard Docker MongoDB setup)
- NodeJS Version: v24.15.0
- MongoDB Version: 7.0.32 / wiredTiger
- Proxy: Traefik v3.4 (Let’s encrypt - custom headers)
- Firewalls involved: Standard UFW / Router firewall (Port 80 and 443 open)

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [November 3, 2026, 8:58pm UTC](https://forums.rocket.chat/t/android-app-v4-78-0-fails-to-download-open-pdf-files-with-error-while-downloading-file-despite-working-fine-on-web-desktop/23065/2 "2026-11-03T20:58:03Z")

</div>

Before you go any further please read the requirements for 8.9.x and compare with your setup.

### **Engine versions**

- Node: `>=22.22.3 <23 || >=24.15.0 <25`
- MongoDB: `8.0`
- Apps-Engine: `1.67.0`

> **[Release 8.9.0 LTS · RocketChat/Rocket.Chat](https://github.com/RocketChat/Rocket.Chat/releases/tag/8.9.0)**
>
> Release Date: October 5, 2026
> Support Window: Supported until October 31, 2027 (LTS, 12 months from the release date)
> 
> 🟢 Long-Term Support release
> 8.9.0 is a Long-Term Support (LTS) release, suppor...

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [November 3, 2026, 9:02pm UTC](https://forums.rocket.chat/t/android-app-v4-78-0-fails-to-download-open-pdf-files-with-error-while-downloading-file-despite-working-fine-on-web-desktop/23065/3 "2026-11-03T21:02:15Z")

</div>

Note it seems to occur on 8.5.x as well, but you still need go fix your install.

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [November 4, 2026, 3:29pm UTC](https://forums.rocket.chat/t/android-app-v4-78-0-fails-to-download-open-pdf-files-with-error-while-downloading-file-despite-working-fine-on-web-desktop/23065/4 "2026-11-04T15:29:36Z")

</div>

This is under investigation by the team.

---

<div class="post-metadata">

**Author:** ![alk](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@alk](https://forums.rocket.chat/u/alk)\
**Post date:** [November 6, 2026, 3:54am UTC](https://forums.rocket.chat/t/android-app-v4-78-0-fails-to-download-open-pdf-files-with-error-while-downloading-file-despite-working-fine-on-web-desktop/23065/5 "2026-11-06T03:54:27Z")

</div>

In version 4.79.0 of beta channel file downloads are available - possible

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [November 6, 2026, 11:17am UTC](https://forums.rocket.chat/t/android-app-v4-78-0-fails-to-download-open-pdf-files-with-error-while-downloading-file-despite-working-fine-on-web-desktop/23065/6 "2026-11-06T11:17:40Z")

</div>

Note:

> <https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/7879>
>
> \## Proposed changes
> On Android since 4.78.0, tapping a PDF, text file or any oth…er attachment that is not an image, audio or video shows "Error while downloading file" and nothing opens. Only release builds are affected. PR #7787 turned on R8 minification, and R8 renames Expo's \`@Field\` annotation class. \`@magrinj/expo-quick-look\` declares \`previewFile\`'s \`PreviewOptions\` without \`@OptimizedRecord\`, so Expo reads \`@Field\` by reflection to map the JS options. With the annotation renamed, that read throws a \`NullPointerException\` ("The 1st argument cannot be cast to type PreviewOptions"), which \`fileDownloadAndPreview\` shows as the download error.
> 
> This adds \`-keep @interface expo.modules.kotlin.records.Field { \*; }\` to \`android/app/proguard-rules.pro\`, so R8 keeps the annotation under its real name.
> 
> \## Issue(s)
> https://rocketchat.atlassian.net/browse/NATIVE-1882
> Closes https://github.com/RocketChat/Rocket.Chat.ReactNative/issues/7878
> 
> \## How to test or reproduce
> 1. Build an Android release build (minified), not a debug build
> 2. Upload a PDF and a .txt file to a room
> 3. Open the room and tap each attachment
> 4. Observe the Android "Open with" chooser opens
> 
> Before this change: the toast "Error while downloading file" showed and nothing opened.
> 
> \## Screenshots
> N/A
> 
> \## Types of changes
> 
> \- \[x\] Bugfix (non-breaking change which fixes an issue)
> \- \[\] Improvement (non-breaking change which improves a current function)
> \- \[\] New feature (non-breaking change which adds functionality)
> \- \[\] Documentation update (if none of the other choices apply)
> 
> \## Checklist
> 
> \- \[x\] I have read the \[CONTRIBUTING\](https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/CONTRIBUTING.md) doc
> \- \[x\] I have signed the \[CLA\](https://cla-assistant.io/RocketChat/Rocket.Chat.ReactNative)
> \- \[x\] Lint and unit tests pass locally with my changes
> \- \[\] I have added tests that prove my fix is effective or that my feature works (if applicable)
> \- \[\] I have added necessary documentation (if applicable)
> \- \[\] Any dependent changes have been merged and published in downstream modules
> 
> \## Further comments
> \- The rule is the same one Expo added upstream in expo/expo#51206. It is not in any \`expo-modules-core\` 57.x release (we are on 57.0.18), so the line can be removed once we move to a version that ships it.
> \- I chose this over patching \`@magrinj/expo-quick-look\` to add \`@OptimizedRecord\`: the patch fixes one library, while the rule covers every Expo module Record without \`@OptimizedRecord\`. Version 0.5.0 of the library has the same gap, so upgrading it would not help.
> \- No unit test: R8 only runs in Android release builds, which Jest cannot exercise.
> \- Verified on an Android 16 emulator with a minified release build against a local 9.1 workspace. Without the fix, the PDF showed the toast. With it, the PDF and .txt both open the chooser, and the R8 mapping keeps \`expo.modules.kotlin.records.Field\` unrenamed. Not checked: other Android versions, or a device with a PDF viewer installed.
> \- iOS and Android debug builds are not affected; neither runs R8.
> 
> 
> 
> 
> 
> 
> \## Summary by CodeRabbit
> 
> \* \*\*Chores\*\*
> \* Updated Android build configuration to support Kotlin-based Expo modules.
> \* This maintenance change does not add or alter any user-facing features.
