immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
38.9k stars 1.84k forks source link

External Libraries 404 for deactivated users #7782

Closed m3brown closed 1 month ago

m3brown commented 3 months ago

The bug

I have two users in my system, one of which was deactivated a couple weeks ago. The deactivated user had a couple of external libraries.

With the recent UI update, the "deactivated" external libraries appear in the new global External Libraries interface, and they are stuck in a continuous spinny loop. This also appears to cause a spinny loop for any valid libraries further down the list.

Clues from my browser's inspect panel:

GET http://10.0.0.30:2283/api/user/info/513e8c09-ed34-49bb-90fd-60ded984eaf1

{"message":"User not found","error":"Not Found","statusCode":404}

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.98.1

Version of Immich Mobile App

v1.98.1

Platform with the issue

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ["start.sh", "immich"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro

      - /srv/dev-disk-by-id-ata-WDC_WD80EMAZ-00WJTA0_JEGJ1LJN-part1/photo:/mnt/photo/cameras:ro

    ports:
      - 2283:3001
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: quicksync
    #### copy-pasted by Mike from hwaccel.transcoding.yml
    devices:
      - /dev/dri:/dev/dri  # If using Intel QuickSync or VAAPI
    ####

    command: ["start.sh", "microservices"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro

      - /srv/dev-disk-by-id-ata-WDC_WD80EMAZ-00WJTA0_JEGJ1LJN-part1/photo:/mnt/photo/cameras:ro

    env_file:
      - stack.env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

UPLOAD_LOCATION=/srv/dev-disk-by-id-ata-WDC_WD80EMAZ-00WJTA0_JEGJ1LJN-part1/appdata/immich/upload
IMMICH_VERSION=release
TYPESENSE_API_KEY=<redacted>
DB_PASSWORD=postgres
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Create user, add external libraries
2. Deactivate user, wait 7 days for the deactivation to be permanent
3. ... upgrade to 1.98.1
4. Visit the External Libraries admin panel
5. Observe that the "deactivated" libraries appear and spinny wheel indefinitely

Additional information

No response

jrasm91 commented 3 months ago

Thank you for the bug report!

m3brown commented 3 months ago

It looks like stopping and restarting the stack resolved the issue. FWIW, I use watchtower to update my services.

danieldietzler commented 1 month ago

@m3brown is it still working for you?

m3brown commented 1 month ago

It's been working fine since my message above. If nobody else has experienced the issue I think closing this is warranted.