Downloading large album fails in webapp on devices with limited memory #2326

Closed
opened 2026-02-05 05:58:11 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @kamzil on GitHub (Mar 1, 2024).

The bug

When I try to download an album from the webapp on either Firefox or Brave browser on Android, the app first displays a progress bar that says "Downloading".

  • On Brave this fails already at 10% with a 700MB zip file with an error popup on the top right saying "Unable to download files".
  • On Firefox, the progress finishes, and it finally opens the normal "Download this file?" dialog. When clicking OK, at that point it actually starts to save the file to the phone's storage, but Firefox crashes before it can finish.

I think how this works is it's actually streaming the zip into the browser's memory, and only after it's finished, it will start "downloading" the file to the storage, rather than behaving like a normal browser file download where file is streamed to the device's storage from the start. Maybe the device's RAM gets too full and Firefox gets killed. This doesn't appear to be a very scalable way of downloading large files, as mobile apps are often very restricted on RAM usage.

Looking at the source code, it seems to stream the data from the server into a client-side blob and only then opening it as a link to initiate the browser download functionality to save it to the storage.

The OS that Immich Server is running on

Docker

Version of Immich Server

v1.96.0

Version of Immich Mobile App

Web

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

.

Your .env content

.

Reproduction steps

1. Create album with lots of photos
2. Click download icon from the album view in webapp on device with limited memory
3. App gets killed because of too high memory usage

Additional information

No response

Originally created by @kamzil on GitHub (Mar 1, 2024). ### The bug When I try to download an album from the webapp on either Firefox or Brave browser on Android, the app first displays a progress bar that says "Downloading". * On Brave this fails already at 10% with a 700MB zip file with an error popup on the top right saying "Unable to download files". * On Firefox, the progress finishes, and it finally opens the normal "Download this file?" dialog. When clicking OK, at that point it actually starts to save the file to the phone's storage, but Firefox crashes before it can finish. I think how this works is it's actually streaming the zip into the browser's memory, and only after it's finished, it will start "downloading" the file to the storage, rather than behaving like a normal browser file download where file is streamed to the device's storage from the start. Maybe the device's RAM gets too full and Firefox gets killed. This doesn't appear to be a very scalable way of downloading large files, as mobile apps are often very restricted on RAM usage. Looking at the [source code](https://github.com/immich-app/immich/blob/main/web/src/lib/utils/asset-utils.ts#L33), it seems to stream the data from the server into a client-side blob and only then opening it as a link to initiate the browser download functionality to save it to the storage. ### The OS that Immich Server is running on Docker ### Version of Immich Server v1.96.0 ### Version of Immich Mobile App Web ### Platform with the issue - [ ] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML . ``` ### Your .env content ```Shell . ``` ### Reproduction steps ```bash 1. Create album with lots of photos 2. Click download icon from the album view in webapp on device with limited memory 3. App gets killed because of too high memory usage ``` ### Additional information _No response_
OVERLORD added the 📱mobile label 2026-02-05 05:58:11 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2326