Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ERR Can't create stack error=createStack, POST, http://localhost:2283/api/stacks, 400 Bad Request #749

Open
simulot opened this issue Feb 23, 2025 · 2 comments · Fixed by #752
Assignees
Labels
bug Something isn't working

Comments

@simulot
Copy link
Owner

simulot commented Feb 23, 2025

This error occurs when uploading a takeout with version v0.23 or higher to a server that already has the same photos uploaded using Immich-go version v0.22.

Path to reproduce:

  1. You have several versions of the same photo with related JSON files:
    • IMG_20160824_190249.jpg
    • IMG_20160824_190249(1).jpg
    • IMG_20160824_190249-edited.jpg
    • IMG_20160824_190249.jpg.supplemental-metadata(1).json
    • IMG_20160824_190249.jpg.supplemental-metadata.json
  2. Use Immich-go v0.21 to upload them, but notice that the JSON files are not correctly matched with their respective photos.
  3. Upload them again using a takeout with Immich-go v0.23+.

Analysis

  1. immich-go replaces uploaded assets with IMG_20160824_190249.jpg, 🤔
  2. immich-go stacks the 3 photos that are now identical, leading a bad request 😓
2025-02-23T08:13:01+01:00 QUERY 12 createStack POST http://localhost:2283/api/stacks
   Accept [application/json]
   Content-Type [application/json]
   X-Api-Key redacted
-- request JSON Body --
{
 "assetIds": [
  "",
  "4927d2c7-75e8-40cd-b327-d92ff899860b"
 ]
}

Thank to @azwillnj for sharing his samples

@simulot simulot self-assigned this Feb 23, 2025
@simulot simulot added the bug Something isn't working label Feb 23, 2025
simulot added a commit that referenced this issue Feb 23, 2025
* discard the ID obtained via replaceAsset, and set the current ID

* refactor: better use of DeviceAssetID to manage images with the same name fix: #749
@Ricostyle21
Copy link

I'm having the bad request error with a 400 Bad Request as response to an AssetReplace API call. Is this related, or should I create a new issue?

@simulot simulot reopened this Feb 27, 2025
@simulot
Copy link
Owner Author

simulot commented Feb 27, 2025

Issue reopened.
I still looking for logs from immich and from the server side. And possibly at DEBUG level.
TIA

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants