immich
immich copied to clipboard
[BUG] Infinitely Growing div during multi-file downloads
The bug
When downloading a lot of photos from the web client, the status dialog overflows (I'm downloading 2000 files now):
In the inspector, the width of this div is ever-expanding (the % is rapidly increasing as I watch it).
The OS that Immich Server is running on
Windows 10
Version of Immich Server
v1.60.0
Platform with the issue
- [ ] Server
- [X] Web
- [ ] Mobile
Can you describe how are you downloading a lot of files to help us reproduce this issue?
Gif added above to show ever-expanding div.
From the timeline, I am selecting all files from a date (~2000 in this case), and then clicking the download button on the 3-dots menu in the upper right of a corner.
Does this help?
Since we have multiple ways of selecting and downloading files. I need to know the exact steps you performed to reproduce the issue
I refreshed the timeline page (/photos) to start from scratch. Browser is Firefox.
Then I selected all of the files from a date by clicking the date (:
Then I clicked download from the 3-dots menu:
Then the dialog appeared and stayed like this at 0% for about a minute:
Then the progress bar started moving and the bug happens:
Eventually, the progress bar disappears and the files download successfully as a large zip.
Does this help?
Thank you for the report. Does it happen with 1 file selected for download, how many files did you choose for this to happen?
The original report was with 2129 files selected. I've been able to reproduce it on as few as 2 files (but not 1).
It does not happen with all photos and videos, and seems to affect motion photos most often (it has affected every motion photo I have tried it on). With the same two files, the behavior is the same every time.
No errors show up in the server logs.
hello, i am having the same issue, see attached image.
after some experimentation it seems to me as well that the problem only (or most frequently) occurs with motion photos, even when just selecting one motion photo. I am running v1.61.0
maybe the file size (and therefore progress indicator) is not calculated correctly for motion photos?
This is probably because e.lengthComputable is not check here:
https://github.com/immich-app/immich/blob/f04e47803c3eb5b0d7b0bf7fc5c0a12fc74e7931/web/src/lib/utils/asset-utils.ts#L52
Hmm, maybe not. It looks like lengthComputable is always false because Immich isn't setting a Content-Length header (why?). I'll take a closer look.
here's a sample motion image (i guess it gets split into a heic and a mov) that causes the error for me. immich.zip
fwiw I can reproduce this with motion photos on v1.57.1, I can't on v1.61.0 though.