[BUG] immich-web stopped working with 1.20.0 on NixOS #189

Closed
opened 2026-02-04 18:35:35 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @felschr on GitHub (Aug 7, 2022).

Describe the bug
After upgrading from 1.19.1 to 1.20.0, I'm seeing 500 responses in immich-web for these endpoints:
/data/user/get-my-user-info
/data/album/get-all-albums
/data/asset/get-all-assets

I can access the server fine with the Android client (which is still on 1.19.0).

Task List

Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.

  • I have read thoroughly the README setup and installation instructions.
  • I have included my docker-compose file.
  • I have included my redacted .env file.
  • I have included information on my machine, and environment.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
immich-web's API calls should succeed so that photos can be viewed.

Screenshots

System

  • Phone OS Android: 12
  • Server Version: 1.20.0
  • Mobile App Version: 1.19.0 build.29

Additional context
My immich configuration (using NixOS's OCI containers integration):
d3aaac8c50/services/immich.nix
This configuration mostly worked with 1.19.1, only the immich-machine-learning service failed with it.

I see there is still a reference to VITE_SERVER_ENDPOINT in the code base for immich-web:
https://github.com/immich-app/immich/search?q=VITE_SERVER_ENDPOINT
Thus, I've tried using 1.20.0 with and without VITE_SERVER_ENDPOINT, but the issue remains.

Originally created by @felschr on GitHub (Aug 7, 2022). **Describe the bug** After upgrading from 1.19.1 to 1.20.0, I'm seeing 500 responses in immich-web for these endpoints: `/data/user/get-my-user-info` `/data/album/get-all-albums` `/data/asset/get-all-assets` I can access the server fine with the Android client (which is still on 1.19.0). **Task List** *Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.* - [x] I have read thoroughly the README setup and installation instructions. - [x] I have included my `docker-compose` file. - [x] I have included my redacted `.env` file. - [x] I have included information on my machine, and environment. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** immich-web's API calls should succeed so that photos can be viewed. **Screenshots** **System** - Phone OS Android: `12` - Server Version: `1.20.0` - Mobile App Version: `1.19.0 build.29` **Additional context** My immich configuration (using NixOS's OCI containers integration): https://github.com/felschr/nixos-config/blob/d3aaac8c500c3f28deb298439ddb613119504920/services/immich.nix This configuration mostly worked with 1.19.1, only the immich-machine-learning service failed with it. I see there is still a reference to `VITE_SERVER_ENDPOINT` in the code base for immich-web: https://github.com/immich-app/immich/search?q=VITE_SERVER_ENDPOINT Thus, I've tried using 1.20.0 with and without `VITE_SERVER_ENDPOINT`, but the issue remains.
Author
Owner

@alextran1502 commented on GitHub (Aug 7, 2022):

I am not familiar with NixOS. From what I see, there is no concept of docker's DNS in OCI container, perhaps. To remove VITE_SERVER_ENDPOINT, the SSR requests are made directly to http://immich-server:3001

Screen Shot 2022-08-07 at 08 18 34

I think this is the cause of this problem. Is there such a mechanism in NixOS's OCI container?

@alextran1502 commented on GitHub (Aug 7, 2022): I am not familiar with NixOS. From what I see, there is no concept of docker's DNS in OCI container, perhaps. To remove VITE_SERVER_ENDPOINT, the SSR requests are made directly to `http://immich-server:3001` <img width="420" alt="Screen Shot 2022-08-07 at 08 18 34" src="https://user-images.githubusercontent.com/27055614/183292649-90b30dfa-3d58-4538-a90a-7bb92a6b52ee.png"> I think this is the cause of this problem. Is there such a mechanism in NixOS's OCI container?
Author
Owner

@felschr commented on GitHub (Aug 7, 2022):

Thank you for the response.
Generally it has DNS capability (when enabled), but since I manage the postgresql & redis instances on the host system, I needed a way to access the host system's services. Because I couldn't figure out a better way, I'm using --network=host for this purpose. This also disables the DNS resolution, though.
That's why I added all those --add-host calls like --add-host=immich-server:localhost.
But I just noticed that these options don't work. I had to change those calls to target the IP instead, and now it's working 🥳:
--add-host=immich-server:127.0.0.1.

@felschr commented on GitHub (Aug 7, 2022): Thank you for the response. Generally it has DNS capability (when enabled), but since I manage the postgresql & redis instances on the host system, I needed a way to access the host system's services. Because I couldn't figure out a better way, I'm using `--network=host` for this purpose. This also disables the DNS resolution, though. That's why I added all those `--add-host` calls like `--add-host=immich-server:localhost`. But I just noticed that these options don't work. I had to change those calls to target the IP instead, and now it's working 🥳: `--add-host=immich-server:127.0.0.1`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#189