immich-go
immich-go copied to clipboard
google photos upload, AssetReplace 500 error when uploading -edited photos
When there is a photo.jpg and photo-edited.jpg, immich-go appears to be uploading the -edited version first, then attempting to replace it with the unedited version, and an error is thrown.
2025-04-12 17:49:26 INF scanned image file file=league:IMG_20190622_114121.jpg
2025-04-12 17:49:26 INF scanned image file file=league:IMG_20190622_114121-edited.jpg
2025-04-12 17:49:26 INF scanned sidecar file file=league:IMG_20190622_114121.jpg.supplemental-metadata.json type=asset metadata title=IMG_20190622_114121.jpg date=2019-06-22 09:41:21
2025-04-12 17:49:26 INF associated metadata file file=league:IMG_20190622_114121.jpg json=IMG_20190622_114121.jpg.supplemental-metadata.json matcher=matchNormal
:2025-04-12 17:49:26 INF associated metadata file file=league:IMG_20190622_114121-edited.jpg json=IMG_20190622_114121.jpg.supplemental-metadata.json matcher=matchEditedName
:2025-04-12 17:50:23 INF uploaded file=league:IMG_20190622_114121-edited.jpg
:2025-04-12 17:50:23 INF added to an album file=league:IMG_20190622_114121-edited.jpg album=league
:2025-04-12 17:50:23 INF Tagged file=league:IMG_20190622_114121-edited.jpg tag=league
:2025-04-12 17:50:26 ERR upload error file=league:IMG_20190622_114121.jpg error=AssetReplace, PUT, http://localhost:2283/api/assets/d60dd612-9297-4d5f-a30d-d7e9c56b2662/original, 500 Internal Server Error
:2025-04-12 17:50:26 INF Stacked file=league:IMG_20190622_114121-edited.jpg
:2025-04-12 17:50:26 INF Stacked file=league:IMG_20190622_114121.jpg
Here are the file sizes. The unedited is larger, which may be why it's attempting to replace with the larger, unedited version. Although immich-go didn't put server's asset upgraded in the logs, so maybe not.
> ls -lh
1.7M Mar 29 20:30 IMG_20190622_114121-edited.jpg
3.1M Mar 29 20:30 IMG_20190622_114121.jpg
Ideally, both should be kept and stacked.
Perhaps it tried to replace too quickly? Like before the file was fully uploaded, or before/during storage migration?
Some files are now stuck in an error state in the upload/ directory, unmigrated.
Error 500 means something has happened on the server side.
Immich-go is widely used to upload massive takeouts at full throttle... I'd rather think the edited photo was known by the immich server, causing some errors
You can run immich-go with log-level debug and the same on the server side. Both logs can be correlated
Error 500 means something has happened on the server side.
Immich-go is widely used to upload massive takeouts at full throttle... I'd rather think the edited photo was known by the immich server, causing some errors
You can run immich-go with log-level debug and the same on the server side. Both logs can be correlated
When I ran into this bug, --on-server-errors continue let me proceed with ~8000 uploads and 2 errors.