Open anderbubble opened 2 weeks ago
Looks like this might be the same as #8608.
I've had the exact same problem. (Immich v1.103.1, Immich CLI v2.2.0, Node.Js v21.7.3).
For me, the upload fails with or without the "--recursive" flag. It did successfully upload 171 JPG images via specifying a file name range "file[0-171].JPG", but failed to upload a different batch of about 100 photos. It also uploaded two 1.3GB .AVI files together and a single 1.8GB .MOV file successfully, but failed to upload 1.1GB and 1.8GB .MOV files together.
In my case, I didn't run the command through docker, I just used immich upload -A "iCloud Photo Library" ./*.AVI
.
My system never seems to add any assets to an album before failing. If it is going to fail, it always fails at Adding assets to albums | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/80 assets
I used fdupes -rn --delete .
to find and remove duplicate files in the library, which let me finish an upload successfully, so I'm no longer stuck. I also realized that --album
wasn't doing what I intended, but it was --album-name
that I wanted.
But I still think that either immich or the CLI needs to handle this case better.
Windows solution reference:
# This is to output first to see which duplicates are present
$folderPath = "C:\path\to\your\folder"; $hashes = Get-ChildItem -Path $folderPath -Recurse -File | Get-FileHash; $duplicates = $hashes | Group-Object -Property Hash | Where-Object { $_.Count -gt 1 }; $duplicates | ForEach-Object { Write-Output "Duplicate files found:"; $_.Group | ForEach-Object { Write-Output $_.Path }; Write-Output "---" }
# THEN DELETE
$folderPath = "C:\path\to\your\folder"; $hashes = Get-ChildItem -Path $folderPath -Recurse -File | Get-FileHash; $duplicates = $hashes | Group-Object -Property Hash | Where-Object { $_.Count -gt 1 }; $duplicates | ForEach-Object { $_.Group | Select-Object -Skip 1 | Remove-Item -Force }
The bug
I am importing an Apple Photos library with the CLI.
This proceeds successfully to import the images, but then fails when "Adding assets to albums."
On the server, this is produced at the time of the error:
The same error occurs if I restart the server and re-run the same import. (The logs above are from such a re-run, which is why all the assets are duplicates.)
The OS that Immich Server is running on
Debian GNU/Linux 12 (bookworm)
Version of Immich Server
v1.102.3
Version of Immich Mobile App
1.102.2 build.151
Platform with the issue
Your docker-compose.yml content
Relevant log output