immich-app / immich

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

Unknown keys found: "image" #8807

Closed 5ouma closed 5 months ago

5ouma commented 5 months ago

The bug

I use my config with the "image" section. With this, Immich warns that there is no matched key, and this config is not reflected on the web. Also, I couldn't edit image config from the web even if config is not existing.

The OS that Immich Server is running on

OrbStack v1.5.1

Version of Immich Server

v1.101.0

Version of Immich Mobile App

v1.101.0

Platform with the issue

Your docker-compose.yml content

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:v1.101.0@sha256:c1dbaec9766ba7a380833af2717c911a1490849e93060575414fb7f67378a03a
    command: ["start.sh", "immich"]
    env_file: [".env"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ./config/immich.json:${IMMICH_CONFIG_FILE}:ro
    depends_on:
      - redis
      - database
      - tailscale
    network_mode: service:tailscale
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:v1.101.0@sha256:c1dbaec9766ba7a380833af2717c911a1490849e93060575414fb7f67378a03a
    command: ["start.sh", "microservices"]
    env_file: [".env"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ./config/immich.json:${IMMICH_CONFIG_FILE}:ro
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:v1.101.0@sha256:067b76281cf7cb894e1a380aa0d388c6a04e0b192cdbaad3c5f82bdf71ff7821
    env_file: [".env"]
    volumes:
      - model-cache:/cache
    restart: always

  redis:
    container_name: immich_redis
    image: redis:7.2.4-alpine@sha256:7635b0bfdd7dd8552b4b31d6541fef07b734614045b45a52fd5cc27c9dada9e2
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg16-v0.2.1@sha256:ff2288833f32aa863ba46f4c6f5b5c143f526a2d27f4cca913c232f917a66602
    environment:
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  backup:
    container_name: immich_db_dumper
    image: prodrigestivill/postgres-backup-local:16@sha256:c577b0d62673d4dce0471c75d21e3e08e4e9789903f5a3fd6613c410442e9670
    env_file: [".env"]
    environment:
      POSTGRES_HOST: database
      POSTGRES_CLUSTER: "TRUE"
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      SCHEDULE: "@daily"
      POSTGRES_EXTRA_OPTS: "--clean --if-exists"
      BACKUP_DIR: /db_dumps
    volumes:
      - ./db_dumps:/db_dumps
    depends_on:
      - database
    restart: always

  tailscale:
    container_name: immich_tailscale
    hostname: immich
    image: tailscale/tailscale:v1.62.1@sha256:3b310f980cd9ff0e334e48c53eb95b21d77b72a596854c4369fd028f83b41b10
    env_file: [".env"]
    environment:
      TS_STATE_DIR: /var/lib/tailscale
      TS_SERVE_CONFIG: /config/tailscale.json
    volumes:
      - tailscale-state:/var/lib/tailscale
      - /dev/net/tun:/dev/net/tun
      - ./config/tailscale.json:/config/tailscale.json:ro
    cap_add:
      - net_admin
      - sys_module
    restart: always

volumes:
  pgdata:
  model-cache:
  tailscale-state:

Your .env content

UPLOAD_LOCATION=./library
IMMICH_CONFIG_FILE=/config/immich.json
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_PASSWORD="<my db password>"
DB_DATABASE_NAME=immich
TS_AUTHKEY=""

Reproduction steps

I use this config below and other than "image", there is no warnings.

{
  "image": {
    "thumbnailSize": 1080,
    "thumbnailFormat": "webp",
    "previewSize": 2160,
    "previewFormat": "jpeg",
    "quality": 100,
    "colorspace": "p3"
  },
  "job": {
    "thumbnailGeneration": { "concurrency": 5 },
    "metadataExtraction": { "concurrency": 5 },
    "library": { "concurrency": 5 },
    "sidecar": { "concurrency": 5 },
    "search": { "concurrency": 5 },
    "smartSearch": { "concurrency": 2 },
    "faceDetection": { "concurrency": 2 },
    "videoConversion": { "concurrency": 1 },
    "migration": { "concurrency": 5 },
    "backgroundTask": { "concurrency": 5 }
  },
  "library": {
    "watch": { "enabled": false },
    "scan": { "enabled": true, "cronExpression": "0 0 * * *" }
  },
  "logging": { "enabled": true, "level": "log" },
  "machineLearning": {
    "enabled": true,
    "url": "http://immich-machine-learning:3003",
    "clip": { "enabled": true, "modelName": "ViT-B-32__openai" },
    "facialRecognition": {
      "enabled": true,
      "modelName": "buffalo_l",
      "minScore": 0.7,
      "maxDistance": 0.5,
      "minFaces": 3
    }
  },
  "map": {
    "enabled": true,
    "lightStyle": "",
    "darkStyle": ""
  },
  "reverseGeocoding": { "enabled": true },
  "oauth": {
    "autoLaunch": false,
    "autoRegister": true,
    "buttonText": "Login with OAuth",
    "clientId": "",
    "clientSecret": "",
    "defaultStorageQuota": 0,
    "enabled": false,
    "issuerUrl": "",
    "mobileOverrideEnabled": false,
    "mobileRedirectUri": "",
    "scope": "openid email profile",
    "signingAlgorithm": "RS256",
    "storageLabelClaim": "preferred_username",
    "storageQuotaClaim": "immich_quota"
  },
  "passwordLogin": { "enabled": true },
  "server": { "externalDomain": "", "loginPageMessage": "" },
  "storageTemplate": {
    "enabled": true,
    "hashVerificationEnabled": true,
    "template": "{{y}}/{{MM}}-{{dd}}/{{filename}}"
  },
  "theme": { "customCss": "" },
  "trash": { "enabled": true, "days": 30 },
  "user": { "deleteDelay": 7 },
  "newVersionCheck": { "enabled": true },
  "ffmpeg": {
    "crf": 23,
    "preset": "ultrafast",
    "targetAudioCodec": "aac",
    "acceptedAudioCodecs": ["aac", "mp3", "libopus"],
    "targetVideoCodec": "h264",
    "acceptedVideoCodecs": ["h264", "hevc", "vp9"],
    "targetResolution": "original",
    "maxBitrate": "0",
    "threads": 0,
    "transcode": "all",
    "tonemap": "hable",
    "twoPass": false,
    "accel": "disabled",
    "cqMode": "auto",
    "temporalAQ": false,
    "preferredHwDevice": "auto",
    "npl": 0,
    "bframes": -1,
    "refs": 0,
    "gopSize": 0
  }
}

Relevant log output

immich_microservices     | [Nest] 6  - 04/15/2024, 10:24:27 AM    WARN [SystemConfigCore] Unknown keys found: {
immich_microservices     |   "image": {
immich_microservices     |     "thumbnailSize": 1080,
immich_microservices     |     "thumbnailFormat": "webp",
immich_microservices     |     "previewSize": 2160,
immich_microservices     |     "previewFormat": "jpeg",
immich_microservices     |     "quality": 100,
immich_microservices     |     "colorspace": "p3"
immich_microservices     |   }
immich_microservices     | }

Additional information

No response

alextran1502 commented 5 months ago

Here is from the default json content

{
  "ffmpeg": {
    "crf": 23,
    "threads": 0,
    "preset": "ultrafast",
    "targetVideoCodec": "h264",
    "acceptedVideoCodecs": [
      "h264"
    ],
    "targetAudioCodec": "aac",
    "acceptedAudioCodecs": [
      "aac",
      "mp3",
      "libopus"
    ],
    "targetResolution": "720",
    "maxBitrate": "0",
    "bframes": -1,
    "refs": 0,
    "gopSize": 0,
    "npl": 0,
    "temporalAQ": false,
    "cqMode": "auto",
    "twoPass": false,
    "preferredHwDevice": "auto",
    "transcode": "required",
    "tonemap": "hable",
    "accel": "disabled"
  },
  "job": {
    "backgroundTask": {
      "concurrency": 5
    },
    "smartSearch": {
      "concurrency": 2
    },
    "metadataExtraction": {
      "concurrency": 5
    },
    "faceDetection": {
      "concurrency": 2
    },
    "search": {
      "concurrency": 5
    },
    "sidecar": {
      "concurrency": 5
    },
    "library": {
      "concurrency": 5
    },
    "migration": {
      "concurrency": 5
    },
    "thumbnailGeneration": {
      "concurrency": 5
    },
    "videoConversion": {
      "concurrency": 1
    }
  },
  "logging": {
    "enabled": true,
    "level": "log"
  },
  "machineLearning": {
    "enabled": true,
    "url": "http://immich-machine-learning:3003",
    "clip": {
      "enabled": true,
      "modelName": "ViT-B-32__openai"
    },
    "facialRecognition": {
      "enabled": true,
      "modelName": "buffalo_l",
      "minScore": 0.7,
      "maxDistance": 0.5,
      "minFaces": 3
    }
  },
  "map": {
    "enabled": true,
    "lightStyle": "",
    "darkStyle": ""
  },
  "reverseGeocoding": {
    "enabled": true
  },
  "oauth": {
    "autoLaunch": false,
    "autoRegister": true,
    "buttonText": "Login with OAuth",
    "clientId": "",
    "clientSecret": "",
    "defaultStorageQuota": 0,
    "enabled": false,
    "issuerUrl": "",
    "mobileOverrideEnabled": false,
    "mobileRedirectUri": "",
    "scope": "openid email profile",
    "signingAlgorithm": "RS256",
    "storageLabelClaim": "preferred_username",
    "storageQuotaClaim": "immich_quota"
  },
  "passwordLogin": {
    "enabled": true
  },
  "storageTemplate": {
    "enabled": false,
    "hashVerificationEnabled": true,
    "template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}"
  },
  "image": {
    "thumbnailFormat": "webp",
    "thumbnailSize": 250,
    "previewFormat": "jpeg",
    "previewSize": 1440,
    "quality": 80,
    "colorspace": "p3"
  },
  "newVersionCheck": {
    "enabled": true
  },
  "trash": {
    "enabled": true,
    "days": 30
  },
  "theme": {
    "customCss": ""
  },
  "library": {
    "scan": {
      "enabled": true,
      "cronExpression": "0 0 * * *"
    },
    "watch": {
      "enabled": false
    }
  },
  "server": {
    "externalDomain": "",
    "loginPageMessage": ""
  },
  "user": {
    "deleteDelay": 7
  }
}

Can you modify that instead and try again?

5ouma commented 5 months ago

I did copy & paste that default config and ran it, but the output was the same. In addition, I can't save the image config from the web even when I don't specify the config file.

immich_server            | [Nest] 7  - 04/16/2024, 9:28:21 AM    WARN [SystemConfigCore] Unknown keys found: {
immich_server            |   "image": {
immich_server            |     "thumbnailFormat": "webp",
immich_server            |     "thumbnailSize": 250,
immich_server            |     "previewFormat": "jpeg",
immich_server            |     "previewSize": 1440,
immich_server            |     "quality": 80,
immich_server            |     "colorspace": "p3"
immich_server            |   }
immich_server            | }
bo0tzz commented 5 months ago

Can you double check that all your containers are really on the latest version?

5ouma commented 5 months ago

They must be the latest because Renovate didn't make any PR.

bo0tzz commented 5 months ago

Can you check the actual running containers? Either their image hash or the package.json inside of the container (cat /usr/src/app/package.json | grep version)

5ouma commented 5 months ago

The output of ghcr.io/immich-app/immich-server is “version”: “1.101.0”.

DonRichie commented 5 months ago

I have the same issue and could solve it by setting "IMMICH_VERSION=main". To me this means there is a bug in the current release version, which has been fixed later.

5ouma commented 5 months ago

Thank you @DonRichie! I too have confirmed that #8579 has already solved this problem. I'll close this issue, but I look forward to releasing the next version soon!

hafx commented 1 month ago

Hello, I have the same issue with the last version of immich (currently v1.113.0). What is the difference between : IMMICH_VERSION=main and IMMICH_VERSION=release ? Thx

bo0tzz commented 1 month ago

main is the development branch, which you should not use unless you know what you're doing.