[BUG] Remove EXTERNAL Libraries, EXTERNAL PATH Not removed? #1568

Closed
opened 2026-02-05 02:23:17 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @davidpan on GitHub (Nov 6, 2023).

Originally assigned to: @etnoy on GitHub.

The bug

After I removed the external libraries, I found that the logs had a task failure message for scanning the external libraries, and viewed the account configuration as shown in the image below.

image
[Nest] 7  - 11/06/2023, 2:00:00 AM   ERROR [JobService] Unable to run job handler (library/library-refresh): EntityNotFoundError: Could not find any entity of type "LibraryEntity" matching: {
    "where": {
        "id": "ee1b7bdc-06fa-46d7-a2e8-b2fcb63cd8a8"
    "relations": {
    },
        "owner": true
    "withDeleted": false
}
[Nest] 7  - 11/06/2023, 2:00:00 AM   ERROR [JobService] EntityNotFoundError: Could not find any entity of type "LibraryEntity" matching: {
    at /usr/src/app/node_modules/typeorm/entity-manager/EntityManager.js:639:39
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async LibraryService.handleQueueAssetRefresh (/usr/src/app/dist/domain/library/library.service.js:291:25)
    at async /usr/src/app/dist/domain/job/job.service.js:108:37
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:350:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:535:24)
[Nest] 7  - 11/06/2023, 2:00:00 AM   ERROR [JobService] Object:
{
  "id": "ee1b7bdc-06fa-46d7-a2e8-b2fcb63cd8a8",
  "refreshModifiedFiles": true,
  "refreshAllFiles": false

The OS that Immich Server is running on

Ubuntu 22.04.3 LTS

Version of Immich Server

v1.84.0

Version of Immich Mobile App

v1.84.0

Platform with the issue

  • Server
  • Web
  • Mobile

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
      - /media/PhotoPrism:/mnt/media/PhotoPrism:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-microservices:
    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:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /media/PhotoPrism:/mnt/media/PhotoPrism:ro
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
      - /dev/dri/card0:/dev/dri/card0
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always
    dns:
      - 1.1.1.1

  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:
      - .env
    restart: always

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.25.1
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

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

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

Your .env content

UPLOAD_LOCATION=/media/immich

# 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
TYPESENSE_API_KEY=****
DB_PASSWORD=****

# 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. Add external libraries, have completed all the scanning (should modify the facial recognition parameters, need to all re-face recognition, so consider removing the external libraries first, to reduce the total elapsed time for processing)
2. User account settings->Libraries->Remove libraries.
3. found external library scanning error log, check the interface, user account settings->Libraries, there is no external library display, user account settings->account information->EXTERNAL PATH, there is still external library information display.

Additional information

No response

Originally created by @davidpan on GitHub (Nov 6, 2023). Originally assigned to: @etnoy on GitHub. ### The bug After I removed the external libraries, I found that the logs had a task failure message for scanning the external libraries, and viewed the account configuration as shown in the image below. <img width="621" alt="image" src="https://github.com/immich-app/immich/assets/12668/6ad1e0e5-dc26-43dc-a8f4-31d308cd08e6"> ``` [Nest] 7 - 11/06/2023, 2:00:00 AM ERROR [JobService] Unable to run job handler (library/library-refresh): EntityNotFoundError: Could not find any entity of type "LibraryEntity" matching: { "where": { "id": "ee1b7bdc-06fa-46d7-a2e8-b2fcb63cd8a8" "relations": { }, "owner": true "withDeleted": false } [Nest] 7 - 11/06/2023, 2:00:00 AM ERROR [JobService] EntityNotFoundError: Could not find any entity of type "LibraryEntity" matching: { at /usr/src/app/node_modules/typeorm/entity-manager/EntityManager.js:639:39 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async LibraryService.handleQueueAssetRefresh (/usr/src/app/dist/domain/library/library.service.js:291:25) at async /usr/src/app/dist/domain/job/job.service.js:108:37 at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:350:28) at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:535:24) [Nest] 7 - 11/06/2023, 2:00:00 AM ERROR [JobService] Object: { "id": "ee1b7bdc-06fa-46d7-a2e8-b2fcb63cd8a8", "refreshModifiedFiles": true, "refreshAllFiles": false ``` ### The OS that Immich Server is running on Ubuntu 22.04.3 LTS ### Version of Immich Server v1.84.0 ### Version of Immich Mobile App v1.84.0 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML 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 - /media/PhotoPrism:/mnt/media/PhotoPrism:ro env_file: - .env depends_on: - redis - database - typesense restart: always immich-microservices: 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: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - /media/PhotoPrism:/mnt/media/PhotoPrism:ro devices: - /dev/dri/renderD128:/dev/dri/renderD128 - /dev/dri/card0:/dev/dri/card0 env_file: - .env depends_on: - redis - database - typesense restart: always dns: - 1.1.1.1 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: - .env restart: always immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - .env restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.25.1 environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data # remove this to get debug messages - GLOG_minloglevel=1 volumes: - tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-server - immich-web restart: always volumes: pgdata: model-cache: tsdata: ``` ### Your .env content ```Shell UPLOAD_LOCATION=/media/immich # 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 TYPESENSE_API_KEY=**** DB_PASSWORD=**** # 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 ```bash 1. Add external libraries, have completed all the scanning (should modify the facial recognition parameters, need to all re-face recognition, so consider removing the external libraries first, to reduce the total elapsed time for processing) 2. User account settings->Libraries->Remove libraries. 3. found external library scanning error log, check the interface, user account settings->Libraries, there is no external library display, user account settings->account information->EXTERNAL PATH, there is still external library information display. ``` ### Additional information _No response_
OVERLORD added the external-library label 2026-02-05 02:23:17 +03:00
Author
Owner

@etnoy commented on GitHub (Nov 9, 2023):

We have a nightly job that cleans up any stale deletions. Is the error still occurring?

@etnoy commented on GitHub (Nov 9, 2023): We have a nightly job that cleans up any stale deletions. Is the error still occurring?
Author
Owner

@davidpan commented on GitHub (Nov 10, 2023):

We have a nightly job that cleans up any stale deletions. Is the error still occurring?

Yes, it still currently shows an EXTERNAL PATH。

@davidpan commented on GitHub (Nov 10, 2023): > We have a nightly job that cleans up any stale deletions. Is the error still occurring? Yes, it still currently shows an EXTERNAL PATH。
Author
Owner

@etnoy commented on GitHub (Feb 7, 2024):

  1. The external path setting in the user settings will not go away when you delete libraries; this is a separate setting
  2. Do you still get this error in the log?

I will close this issue for now, please reopen if the errors still appear in the latest version

@etnoy commented on GitHub (Feb 7, 2024): 1. The external path setting in the user settings will not go away when you delete libraries; this is a separate setting 2. Do you still get this error in the log? I will close this issue for now, please reopen if the errors still appear in the latest version
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1568