#1386·immich-go

One invalid asset ID poisons an entire 50-asset album batch; up to 49 valid photos silently excluded, deterministically

Author: luke3butlerCreated Jul 9, 2026Updated Aug 21, 2026

Environment: same import as #1384 — immich-go 0.32.0, Immich v3.0.1, 46,557-asset Google Takeout, upload from-google-photos, default flags.

Symptom: One album batch failed identically on two consecutive runs:

ERR failed to add assets to album err=AddAssetToAlbum, PUT /api/albums/{id}/assets, 400
Validation failed
[{"origin":"string","code":"invalid_format","format":"uuid","path":["ids",34],"message":"Invalid UUID"}]

On run 1 the same signature also killed a POST /api/albums (assetIds[26]), so that album wasn't created at all; run 2 created it, then hit the PUT variant on a different album. The affected batch's other ~49 valid assets never join the album, and nothing in the report surfaces it (Errors: 0, #1384).

Cause (suspected): One asset that belongs to the album per Google's JSON never obtains a server ID (in my takeout, likely one of the files discovered as unsupported/unknown), and immich-go inserts its empty ID into the batch. The server rejects the whole batch.

Suggested fix: Two independent layers: (1) filter empty/malformed IDs when building album batches; (2) when a 400 names a specific index, drop that element and retry the remaining batch instead of discarding all 50.

Possibly the same root cause as #1287 ("Only 50 images per album"), which matches the shape of first-batch-lands, later-batch-dies.