NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.65k stars 13.8k forks source link

400 error when immich client interacts with immich server. #346275

Open teto opened 3 days ago

teto commented 3 days ago

Describe the bug

This might be the wrong place to submit the report but before annoying upstream immich, I thought I would ask if I had missed some immich shenaningan.

(First of all thanks to the people who made nixpkgs+immich possible. immich looks very polished and it might made possible for me to close the google photo account.).

I am running nixos-unstable with https://github.com/NixOS/nixpkgs/pull/345126 (not sure why, it seemed harmless to cherry-pick).

I have installed immich behind a cname and an nginx with virtualhost immich.mydomain.com and https enabled. I've got machine-learning = { enable = false; }; sadly because it wont build with cuda enabled (for 1.115 at least).

I can upload pictures via the UI just fine. But when I use the CLI I get:

$ immich --version
2.2.22
$ immich upload ~/Photos/toto.jpg
Crawling for assets...
Checking files | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/1 assets
Found 0 new files and 0 duplicates
Failed to verify 1 file:
- /home/teto/Photos/toto.jpg - Error: Error: 400
All assets were already uploaded, nothing to do.

and on the server's journalctl:

`HttpException(400): {"message":["id must be a UUID"],"error":"Bad Request","statusCode":400}`

Sounds to me like mismatched CLI and server versions but both are the latest ? Could not find an answer in upstream tracker. ExecStart=/nix/store/1v2r4l57p8qmsy8nk10gx558s6d2aj2p-immich-1.116.2/bin/server (had the same error with 1.115). On the bottom left, I have this picture that is weird since I can upload from website and it seems to operate fine. image

I can report this upstream after insight from people more familiar with immich on nixpkgs.

Expected behavior

  1. I can upload pictures from CLI
  2. I have "Server online" displayed instead of "server offline"

Notify maintainers

@Scrumplex

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here

Add a :+1: reaction to issues you find important.

dotlambda commented 2 days ago

Make sure to set proxyWebsockets = true in your nginx config.

Atemu commented 11 hours ago

I've got machine-learning = { enable = false; }; sadly because it wont build with cuda enabled (for 1.115 at least).

FYI: You don't need a GPU to use Immich's machine learning features. It works just fine on my 7y/o 15W CPU alone.

teto commented 11 hours ago

Make sure to set proxyWebsockets = true in your nginx config.

Thanks that fixed the "Server offline" issue !

FYI: You don't need a GPU to use Immich's machine learning features. It works just fine on my 7y/o 15W CPU alone.

Good to know, CPU requirements was one of the worries. I will probably try once I got the basics working.

I've upgraded to v1.117.0 but still get the "id must be a UUID" error from CLI when trying to upload an image. I will take it up upstream.