[BUG] Unknown keys found: [object Object] #1612

Closed
opened 2026-02-05 02:40:19 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @ishanjain28 on GitHub (Nov 14, 2023).

The bug

Hello!

On startup, immich reads it's config file. If there is an error, It prints an unhelpful message.

[Nest] 1917  - 11/14/2023, 5:42:01 PM   ERROR [SystemConfigCore] Unable to load configuration file: /var/lib/immich/immich/config due to Error: Unknown keys found: [object Object]
Error: Unknown keys found: [object Object]
    at SystemConfigCore.loadFromFile (/var/lib/immich/immich/server/dist/domain/system-config/system-config.core.js:313:27)
    at async SystemConfigCore.getConfig (/var/lib/immich/immich/server/dist/domain/system-config/system-config.core.js:241:44)
    at async SystemConfigService.getConfig (/var/lib/immich/immich/server/dist/domain/system-config/system-config.service.js:38:24)
    at async Injector.instantiateClass (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:369:37)
    at async callback (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:65:34)
    at async Injector.resolveConstructorParams (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:144:24)
    at async Injector.loadInstance (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:70:13)
    at async Injector.loadProvider (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:97:9)
    at async /var/lib/immich/immich/server/node_modules/@nestjs/core/injector/instance-loader.js:56:13
    at async Promise.all (index 24)

I had copy pasted the file from here, https://immich.app/docs/install/config-file

{
  "ffmpeg": {
    "crf": 23,
    "threads": 0,
    "preset": "ultrafast",
    "targetVideoCodec": "h264",
    "targetAudioCodec": "aac",
    "targetResolution": "720",
    "maxBitrate": "0",
    "bframes": -1,
    "refs": 0,
    "gopSize": 0,
    "npl": 0,
    "temporalAQ": false,
    "cqMode": "auto",
    "twoPass": false,
    "transcode": "required",
    "tonemap": "hable",
    "accel": "disabled"
  },
  "job": {
    "backgroundTask": {
      "concurrency": 5
    },
    "clipEncoding": {
      "concurrency": 2
    },
    "metadataExtraction": {
      "concurrency": 5
    },
    "objectTagging": {
      "concurrency": 2
    },
    "recognizeFaces": {
      "concurrency": 2
    },
    "search": {
      "concurrency": 5
    },
    "sidecar": {
      "concurrency": 5
    },
    "library": {
      "concurrency": 5
    },
    "storageTemplateMigration": {
      "concurrency": 5
    },
    "migration": {
      "concurrency": 5
    },
    "thumbnailGeneration": {
      "concurrency": 5
    },
    "videoConversion": {
      "concurrency": 1
    }
  },
  "machineLearning": {
    "enabled": true,
    "url": "http://immich-machine-learning:3003",
    "classification": {
      "enabled": true,
      "modelName": "microsoft/resnet-50",
      "minScore": 0.9
    },
    "clip": {
      "enabled": true,
      "modelName": "ViT-B-32__openai"
    },
    "facialRecognition": {
      "enabled": true,
      "modelName": "buffalo_l",
      "minScore": 0.7,
      "maxDistance": 0.6,
      "minFaces": 1
    }
  },
  "map": {
    "enabled": true,
    "tileUrl": "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
  },
  "reverseGeocoding": {
    "enabled": true,
    "citiesFileOverride": "cities500"
  },
  "oauth": {
    "enabled": false,
    "issuerUrl": "",
    "clientId": "",
    "clientSecret": "",
    "mobileOverrideEnabled": false,
    "mobileRedirectUri": "",
    "scope": "openid email profile",
    "storageLabelClaim": "preferred_username",
    "buttonText": "Login with OAuth",
    "autoRegister": true,
    "autoLaunch": false
  },
  "passwordLogin": {
    "enabled": true
  },
  "storageTemplate": {
    "template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}"
  },
  "thumbnail": {
    "webpSize": 250,
    "jpegSize": 1440,
    "quality": 80,
    "colorspace": "p3"
  },
  "newVersionCheck": {
    "enabled": true
  },
  "trash": {
    "enabled": true,
    "days": 30
  },
  "theme": {
    "customCss": ""
  },
  "library": {
    "scan": {
      "enabled": true,
      "cronExpression": "0 0 * * *"
    }
  },
  "stylesheets": {
    "css": ""
  }
}

The OS that Immich Server is running on

Debian 12

Version of Immich Server

1.86.0

Version of Immich Mobile App

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

-

Your .env content

TZ=Asia/Kolkata
NODE_ENV=production
LOG_LEVEL=verbose
IMMICH_MEDIA_LOCATION=/mnt/data
IMMICH_CONFIG_FILE=/var/lib/immich/immich/config
DB_HOSTNAME=10.0.50.7
DB_PORT=5432
DB_USERNAME=immich
DB_PASSWORD=asdsada
DB_DATABASE_NAME=immich

Reproduction steps

1.Load env config
2. Checkout 1.86.0 release, build the server
3. Run `node immich/server/dist/main.js immich`

Additional information

Instead of logging this message, It should print the field that is unexpected.

Originally created by @ishanjain28 on GitHub (Nov 14, 2023). ### The bug Hello! On startup, immich reads it's config file. If there is an error, It prints an unhelpful message. ``` [Nest] 1917 - 11/14/2023, 5:42:01 PM ERROR [SystemConfigCore] Unable to load configuration file: /var/lib/immich/immich/config due to Error: Unknown keys found: [object Object] Error: Unknown keys found: [object Object] at SystemConfigCore.loadFromFile (/var/lib/immich/immich/server/dist/domain/system-config/system-config.core.js:313:27) at async SystemConfigCore.getConfig (/var/lib/immich/immich/server/dist/domain/system-config/system-config.core.js:241:44) at async SystemConfigService.getConfig (/var/lib/immich/immich/server/dist/domain/system-config/system-config.service.js:38:24) at async Injector.instantiateClass (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:369:37) at async callback (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:65:34) at async Injector.resolveConstructorParams (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:144:24) at async Injector.loadInstance (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:70:13) at async Injector.loadProvider (/var/lib/immich/immich/server/node_modules/@nestjs/core/injector/injector.js:97:9) at async /var/lib/immich/immich/server/node_modules/@nestjs/core/injector/instance-loader.js:56:13 at async Promise.all (index 24) ``` I had copy pasted the file from here, https://immich.app/docs/install/config-file ``` { "ffmpeg": { "crf": 23, "threads": 0, "preset": "ultrafast", "targetVideoCodec": "h264", "targetAudioCodec": "aac", "targetResolution": "720", "maxBitrate": "0", "bframes": -1, "refs": 0, "gopSize": 0, "npl": 0, "temporalAQ": false, "cqMode": "auto", "twoPass": false, "transcode": "required", "tonemap": "hable", "accel": "disabled" }, "job": { "backgroundTask": { "concurrency": 5 }, "clipEncoding": { "concurrency": 2 }, "metadataExtraction": { "concurrency": 5 }, "objectTagging": { "concurrency": 2 }, "recognizeFaces": { "concurrency": 2 }, "search": { "concurrency": 5 }, "sidecar": { "concurrency": 5 }, "library": { "concurrency": 5 }, "storageTemplateMigration": { "concurrency": 5 }, "migration": { "concurrency": 5 }, "thumbnailGeneration": { "concurrency": 5 }, "videoConversion": { "concurrency": 1 } }, "machineLearning": { "enabled": true, "url": "http://immich-machine-learning:3003", "classification": { "enabled": true, "modelName": "microsoft/resnet-50", "minScore": 0.9 }, "clip": { "enabled": true, "modelName": "ViT-B-32__openai" }, "facialRecognition": { "enabled": true, "modelName": "buffalo_l", "minScore": 0.7, "maxDistance": 0.6, "minFaces": 1 } }, "map": { "enabled": true, "tileUrl": "https://tile.openstreetmap.org/{z}/{x}/{y}.png" }, "reverseGeocoding": { "enabled": true, "citiesFileOverride": "cities500" }, "oauth": { "enabled": false, "issuerUrl": "", "clientId": "", "clientSecret": "", "mobileOverrideEnabled": false, "mobileRedirectUri": "", "scope": "openid email profile", "storageLabelClaim": "preferred_username", "buttonText": "Login with OAuth", "autoRegister": true, "autoLaunch": false }, "passwordLogin": { "enabled": true }, "storageTemplate": { "template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}" }, "thumbnail": { "webpSize": 250, "jpegSize": 1440, "quality": 80, "colorspace": "p3" }, "newVersionCheck": { "enabled": true }, "trash": { "enabled": true, "days": 30 }, "theme": { "customCss": "" }, "library": { "scan": { "enabled": true, "cronExpression": "0 0 * * *" } }, "stylesheets": { "css": "" } } ``` ### The OS that Immich Server is running on Debian 12 ### Version of Immich Server 1.86.0 ### Version of Immich Mobile App - ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML - ``` ### Your .env content ```Shell TZ=Asia/Kolkata NODE_ENV=production LOG_LEVEL=verbose IMMICH_MEDIA_LOCATION=/mnt/data IMMICH_CONFIG_FILE=/var/lib/immich/immich/config DB_HOSTNAME=10.0.50.7 DB_PORT=5432 DB_USERNAME=immich DB_PASSWORD=asdsada DB_DATABASE_NAME=immich ``` ### Reproduction steps ```bash 1.Load env config 2. Checkout 1.86.0 release, build the server 3. Run `node immich/server/dist/main.js immich` ``` ### Additional information Instead of logging this message, It should print the field that is unexpected.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1612