immich-app / immich

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

Reassigning a face to a new person in the photo viewer shows wrong count and hangs for 15 seconds #7754

Closed eygraber closed 9 months ago

eygraber commented 9 months ago

The bug

When I am looking at a photo, and want to re-assign a face to a new person, a loading indicator displays, and it takes 15 seconds until the UI acknowledges that a change was made.

Right after clicking the done button, a message is shown saying "Edited X people" where X is twice the amount of people in the photo.

Here's the API calls made from when I hit the done button:

POST /person -> 201 367abfb4-18fa-4cc4-8499-764c729b6c58
PUT /face/367abfb4-18fa-4cc4-8499-764c729b6c58 -> 200
// 15 seconds later
GET /asset/e6b4bb1a-b8ab-4b03-886d-97b9336815b9

This is logged by immich_server right after I hit the done button:

DEBUG [PersonService] Changing feature photos for 1 person

The OS that Immich Server is running on

Ubuntu 22.04

Version of Immich Server

v1.98.0

Version of Immich Mobile App

v1.98.0

Platform with the issue

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    user: 1000:1001
    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
    env_file:
      - .env
    ports:
      - "2283:3001"
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    user: 1000:1001
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - /disks/storage/immich/volumes/geocoding:/usr/src/app/.reverse-geocoding-dump
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

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

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    user: 1000:1001
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - /disks/storage/immich/volumes/pgdata:/var/lib/postgresql/data
    restart: always

Your .env content

PUID=1000
GUID=1001

# The location where your uploaded files are stored
UPLOAD_LOCATION=/disks/storage/immich/library

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
DB_PASSWORD=...

TZ=America/New_York

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Open a photo
2. Open the info window
3. Edit people (pencil icon)
4. Remove an existing face (minus button on face)
5. Create a new person (plus icon)
6. Click Done

Additional information

No response

martabal commented 9 months ago

Duplicate of #7341

eygraber commented 9 months ago

Does that also account for the 15 second delay?

martabal commented 9 months ago

Does that also account for the 15 second delay?

Yep that's a side effect of that's issue