[BUG] CLI --album option fails with status code 400 #1197

Closed
opened 2026-02-05 00:50:29 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @SitramSoft on GitHub (Aug 7, 2023).

The bug

When I try to run the CLI to add some local assets from a folder to an existing album, it fails with status code 400.

CLI command:

immich upload --key xxx --server http://192.168.0.101:2283/api --yes --recursive --threads 20 --album '2023 - Sabrina' /home/sitram/mounts/data/photos/'Sabrina'/2023/'08 - August'

Output:

Checking connectivity with Immich instance...
Server status: OK
Checking credentials...
Login status: OK
Successful authentication for user xxx@gmail.com
Indexing local assets...
Indexing complete, found 39 local assets
Comparing local assets with those on the Immich instance...
A total of 0 assets will be uploaded to the server
A total of 39 assets will be added to album(s).
NOTE: some assets may already be associated with the album, this will not create duplicates.
Start uploading...
Upload Progress | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% || 0/39 || Current file []
Creating albums...
Error adding asset to album Error: Request failed with status code 400
    at createError (/usr/lib/node_modules/immich/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/lib/node_modules/immich/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/immich/node_modules/axios/lib/adapters/http.js:322:11)
    at IncomingMessage.emit (node:events:526:35)
    at endReadableNT (node:internal/streams/readable:1376:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/json',
      'x-api-key': '4B2qisg3McPQqLAj3WwXQBzCpLy9Ja3qD3RUJGnrysU',
      'User-Agent': 'axios/0.26.1',
      'Content-Length': 1535
    },
    method: 'put',
    url: 'http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets',
    data: '{"assetIds":["22a80fb9-1ae2-406a-bb4f-7e8244e49226","38261a12-3d34-4ecf-aab3-37dd50cd1558","c4e299be-1630-49f9-ade6-a2ec4d74cbff","25f44bd5-c24f-412d-93ec-395f23d89751","00193926-89ff-445f-9485-95b8df8e18aa","bd97f880-2ec6-434d-94e3-7a2943cd641b","9380177b-6d75-4304-aec5-09f9d48f6664","c1cab18e-0660-48ac-a7f7-6e344f8e0aec","8d93b4b5-a428-4db3-ac48-b0652f63a6d7","237625f5-9517-4bab-a83e-f7910890d5ff","1c95bbc6-9471-40d1-8b3c-6df0526dfc13","fd2d16c5-0710-4552-9ac9-7e4b7b0f6fe7","472b18d8-c2ee-4987-b66d-556b18b7e0c2","25994013-576e-433c-8f29-35e3b987baa3","f0bb7fb9-9786-4d64-846e-6ac3b383ee31","28fee525-72d4-4e41-85c3-042542e6e536","79e3146f-1d1e-45a0-8645-5d4dd155aba9","c34eaf81-58dc-43ba-a05d-c9de84cb78c3","5c2c6293-9dd3-4f63-ba29-ad33c47f1cd9","271ce3c2-1d5e-4de7-8182-f6986cd77959","6e9b3f27-9d44-4b3a-a401-6db60f33852f","38cc064e-4d10-41e6-84dd-ffa2463aaaad","5b25777b-3ea6-4dcb-9a00-b5d4391704e9","07703478-7303-4e12-85c3-c34ccae81798","acc6162a-14ff-413f-b07b-fd32a5279ed9","94d35a5d-19ce-457f-9e03-9897de373755","f2cd50d1-b046-4367-9ef4-9b11441b7fa6","a71d64a4-b2c6-41fb-8dbc-ffa97f3f7d58","1a826467-7366-4496-ba14-113beb326614","fd49943e-ba87-436c-b55e-4a2df4e0dba4","8012f358-5f58-4cdd-acab-98d24d0ba7cd","51593732-4fec-44fb-99b4-6eae8707d03b","3a814c8d-7050-498e-948a-c0ccfc9c32e4","95bdbd3a-bb8a-44ab-9388-2ef044aad03c","2db5b899-6aff-4501-84cf-3369d9414bc8","c7e59c9d-a13f-426a-bd05-3c1a79b6bc63","3c9bd11d-1f82-4104-8a71-33cfb57eb029","7f88d03a-51df-432b-bf57-4357867cb393","07e403f6-9fd7-455f-8873-de1a6f7c8c8e"]}'
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      finish: [Function: requestOnFinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: true,
    _last: false,
    chunkedEncoding: false,
    shouldKeepAlive: true,
    maxRequestsOnConnectionReached: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: true,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    strictContentLength: false,
    _contentLength: 1535,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: true,
    socket: Socket {
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: null,
      _closeAfterHandlingError: false,
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 6,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: null,
      _server: null,
      timeout: 5000,
      parser: null,
      _httpMessage: null,
      [Symbol(async_id_symbol)]: -1,
      [Symbol(kHandle)]: [TCP],
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: Timeout {
        _idleTimeout: 5000,
        _idlePrev: [TimersList],
        _idleNext: [Timeout],
        _idleStart: 1135,
        _onTimeout: [Function: bound ],
        _timerArgs: undefined,
        _repeat: null,
        _destroyed: false,
        [Symbol(refed)]: false,
        [Symbol(kHasPrimitive)]: false,
        [Symbol(asyncId)]: 899,
        [Symbol(triggerId)]: 897
      },
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: true,
      [Symbol(kSetKeepAlive)]: true,
      [Symbol(kSetKeepAliveInitialDelay)]: 1,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0
    },
    _header: 'PUT /api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'Content-Type: application/json\r\n' +
      'x-api-key: 4B2qisg3McPQqLAj3WwXQBzCpLy9Ja3qD3RUJGnrysU\r\n' +
      'User-Agent: axios/0.26.1\r\n' +
      'Content-Length: 1535\r\n' +
      'Host: 192.168.0.101:2283\r\n' +
      'Connection: keep-alive\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: nop],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 80,
      protocol: 'http:',
      options: [Object: null prototype],
      requests: [Object: null prototype] {},
      sockets: [Object: null prototype] {},
      freeSockets: [Object: null prototype],
      keepAliveMsecs: 1000,
      keepAlive: true,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 5,
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'PUT',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    joinDuplicateHeaders: undefined,
    path: '/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 4,
      _maxListeners: undefined,
      socket: null,
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      joinDuplicateHeaders: undefined,
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 400,
      statusMessage: 'Bad Request',
      client: [Socket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 14,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: true,
    host: '192.168.0.101',
    protocol: 'http:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 1535,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'x-api-key': [Array],
      'user-agent': [Array],
      'content-length': [Array],
      host: [Array]
    },
    [Symbol(errored)]: null,
    [Symbol(kHighWaterMark)]: 16384,
    [Symbol(kRejectNonStandardBodyWrites)]: false,
    [Symbol(kUniqueHeaders)]: null
  },
  response: {
    status: 400,
    statusText: 'Bad Request',
    headers: {
      server: 'nginx/1.25.0',
      date: 'Mon, 07 Aug 2023 09:44:10 GMT',
      'content-type': 'application/json; charset=utf-8',
      'content-length': '136',
      connection: 'keep-alive',
      'x-powered-by': 'Express',
      etag: '"88-ZSu2we7JewmU34WlvrSHHG8Ymqk"'
    },
    config: {
      transitional: [Object],
      adapter: [Function: httpAdapter],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 0,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      validateStatus: [Function: validateStatus],
      headers: [Object],
      method: 'put',
      url: 'http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets',
      data: '{"assetIds":["22a80fb9-1ae2-406a-bb4f-7e8244e49226","38261a12-3d34-4ecf-aab3-37dd50cd1558","c4e299be-1630-49f9-ade6-a2ec4d74cbff","25f44bd5-c24f-412d-93ec-395f23d89751","00193926-89ff-445f-9485-95b8df8e18aa","bd97f880-2ec6-434d-94e3-7a2943cd641b","9380177b-6d75-4304-aec5-09f9d48f6664","c1cab18e-0660-48ac-a7f7-6e344f8e0aec","8d93b4b5-a428-4db3-ac48-b0652f63a6d7","237625f5-9517-4bab-a83e-f7910890d5ff","1c95bbc6-9471-40d1-8b3c-6df0526dfc13","fd2d16c5-0710-4552-9ac9-7e4b7b0f6fe7","472b18d8-c2ee-4987-b66d-556b18b7e0c2","25994013-576e-433c-8f29-35e3b987baa3","f0bb7fb9-9786-4d64-846e-6ac3b383ee31","28fee525-72d4-4e41-85c3-042542e6e536","79e3146f-1d1e-45a0-8645-5d4dd155aba9","c34eaf81-58dc-43ba-a05d-c9de84cb78c3","5c2c6293-9dd3-4f63-ba29-ad33c47f1cd9","271ce3c2-1d5e-4de7-8182-f6986cd77959","6e9b3f27-9d44-4b3a-a401-6db60f33852f","38cc064e-4d10-41e6-84dd-ffa2463aaaad","5b25777b-3ea6-4dcb-9a00-b5d4391704e9","07703478-7303-4e12-85c3-c34ccae81798","acc6162a-14ff-413f-b07b-fd32a5279ed9","94d35a5d-19ce-457f-9e03-9897de373755","f2cd50d1-b046-4367-9ef4-9b11441b7fa6","a71d64a4-b2c6-41fb-8dbc-ffa97f3f7d58","1a826467-7366-4496-ba14-113beb326614","fd49943e-ba87-436c-b55e-4a2df4e0dba4","8012f358-5f58-4cdd-acab-98d24d0ba7cd","51593732-4fec-44fb-99b4-6eae8707d03b","3a814c8d-7050-498e-948a-c0ccfc9c32e4","95bdbd3a-bb8a-44ab-9388-2ef044aad03c","2db5b899-6aff-4501-84cf-3369d9414bc8","c7e59c9d-a13f-426a-bd05-3c1a79b6bc63","3c9bd11d-1f82-4104-8a71-33cfb57eb029","7f88d03a-51df-432b-bf57-4357867cb393","07e403f6-9fd7-455f-8873-de1a6f7c8c8e"]}'
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: false,
      chunkedEncoding: false,
      shouldKeepAlive: true,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 1535,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: true,
      socket: [Socket],
      _header: 'PUT /api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/json\r\n' +
        'x-api-key: 4B2qisg3McPQqLAj3WwXQBzCpLy9Ja3qD3RUJGnrysU\r\n' +
        'User-Agent: axios/0.26.1\r\n' +
        'Content-Length: 1535\r\n' +
        'Host: 192.168.0.101:2283\r\n' +
        'Connection: keep-alive\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'PUT',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: true,
      host: '192.168.0.101',
      protocol: 'http:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    data: { statusCode: 400, message: [Array], error: 'Bad Request' }
  },
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

The assets appear to be correctly uploaded to the server but they are not added to the existing album.

When running the same command without the --album option, the command executes correctly.

immich upload --key 4B2qisg3McPQqLAj3WwXQBzCpLy9Ja3qD3RUJGnrysU --server http://192.168.0.101:2283/api --yes --recursive --threads 20 /home/sitram/mounts/data/photos/'Sabrina'/2023/'08 - August'
Checking connectivity with Immich instance...
Server status: OK
Checking credentials...
Login status: OK
Successful authentication for user xx@gmail.com
Indexing local assets...
Indexing complete, found 39 local assets
Comparing local assets with those on the Immich instance...
All assets have been backed up to the server

Running the same command with a new album name, fails with the same 400 status code. When I looked on the web interface, I saw that the new album has been created and it was empty.

There are not additional log entries in the docker instance of immich_server. The server was updated to latest release before running the CLI command.

[Nest] 7  - 08/07/2023, 6:26:17 AM     LOG [ImmichServer] Immich Server is listening on http://[::1]:3001 [v1.72.1] [PRODUCTION] 
[Nest] 7  - 08/07/2023, 8:12:46 AM     LOG [CommunicationGateway] New websocket connection: jXFYKxadR0IXsnYGAAAB
[Nest] 7  - 08/07/2023, 8:13:05 AM     LOG [CommunicationGateway] Client jXFYKxadR0IXsnYGAAAB disconnected from Websocket
[Nest] 7  - 08/07/2023, 8:13:08 AM     LOG [CommunicationGateway] New websocket connection: HKk7JdsioB_aeSzxAAAD
[Nest] 7  - 08/07/2023, 8:13:13 AM     LOG [CommunicationGateway] Client HKk7JdsioB_aeSzxAAAD disconnected from Websocket
[Nest] 7  - 08/07/2023, 8:13:16 AM     LOG [CommunicationGateway] New websocket connection: nGXWfVlSDZFT2GBlAAAF
[Nest] 7  - 08/07/2023, 8:13:17 AM     LOG [CommunicationGateway] Client nGXWfVlSDZFT2GBlAAAF disconnected from Websocket
[Nest] 7  - 08/07/2023, 8:13:18 AM     LOG [CommunicationGateway] New websocket connection: CRuSHOOLHnLBhs8ZAAAH
[Nest] 7  - 08/07/2023, 8:13:39 AM     LOG [CommunicationGateway] Client CRuSHOOLHnLBhs8ZAAAH disconnected from Websocket
[Nest] 7  - 08/07/2023, 8:14:52 AM     LOG [CommunicationGateway] New websocket connection: swIonUaDKTFNbpxXAAAJ
[Nest] 7  - 08/07/2023, 8:18:54 AM     LOG [CommunicationGateway] Client swIonUaDKTFNbpxXAAAJ disconnected from Websocket
[Nest] 7  - 08/07/2023, 8:20:12 AM     LOG [CommunicationGateway] New websocket connection: UbaSH6QvcfFxc9USAAAL
[Nest] 7  - 08/07/2023, 8:20:27 AM     LOG [CommunicationGateway] Client UbaSH6QvcfFxc9USAAAL disconnected from Websocket
[Nest] 7  - 08/07/2023, 9:37:35 AM     LOG [CommunicationGateway] New websocket connection: SPaP_VByAu3zKtaCAAAN
[Nest] 7  - 08/07/2023, 9:37:38 AM     LOG [CommunicationGateway] Client SPaP_VByAu3zKtaCAAAN disconnected from Websocket
[Nest] 7  - 08/07/2023, 9:37:38 AM     LOG [CommunicationGateway] New websocket connection: -rXkwdq-PyHCG_zOAAAP
[Nest] 7  - 08/07/2023, 9:37:52 AM     LOG [CommunicationGateway] Client -rXkwdq-PyHCG_zOAAAP disconnected from Websocket
[Nest] 7  - 08/07/2023, 9:37:56 AM     LOG [CommunicationGateway] New websocket connection: JFHWC0Rx7f4GwYaKAAAR
[Nest] 7  - 08/07/2023, 9:38:11 AM     LOG [CommunicationGateway] Client JFHWC0Rx7f4GwYaKAAAR disconnected from Websocket

The OS that Immich Server is running on

Arch

Version of Immich Server

v1.72.1

Version of Immich Mobile App

v1.72.0 build.95

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.9"

services:
#Immich - self hosted photos and videos management application - https://immich.app/
  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
    env_file:
      - .env
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    depends_on:
      - 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
    env_file:
      - .env
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    depends_on:
      - typesense
    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:
      - .env
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    restart: always

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    logging:
      driver: none
    volumes:
      - tsdata:/data
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    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
    volumes:
      - /home/sitram/data/tmp:/tmp
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    restart: always

volumes:
  model-cache:
  tsdata:

Your .env content

COMPOSE_PROJECT_NAME=serenity_immich

###################################################################################
# Database
###################################################################################

# NOTE: The following four database variables support Docker secrets by adding a *_FILE suffix to the variable name
# See the docker-compose documentation on secrets for additional details: https://docs.docker.com/compose/compose-file/compose-file-v3/#secrets
DB_HOSTNAME=192.168.0.101
DB_USERNAME=xx
DB_PASSWORD=xx
DB_DATABASE_NAME=immich

# Optional Database settings:
# DB_PORT=5432

###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=192.168.0.101

# REDIS_URL will be used to pass custom options to ioredis.
# Example for Sentinel
# {"sentinels":[{"host":"redis-sentinel-node-0","port":26379},{"host":"redis-sentinel-node-1","port":26379},{"host":"redis-sentinel-node-2","port":26379}],"name":"redis-sentinel"}
# REDIS_URL=ioredis://eyJzZW50aW5lbHMiOlt7Imhvc3QiOiJyZWRpcy1zZW50aW5lbDEiLCJwb3J0IjoyNjM3OX0seyJob3N0IjoicmVkaXMtc2VudGluZWwyIiwicG9ydCI6MjYzNzl9XSwibmFtZSI6Im15bWFzdGVyIn0=

# Optional Redis settings:

# Note: these parameters are not automatically passed to the Redis Container
# to do so, please edit the docker-compose.yml file as well. Redis is not configured
# via environment variables, only redis.conf or the command line

REDIS_PORT=6379
# REDIS_DBINDEX=0
# REDIS_USERNAME=
# REDIS_PASSWORD=
# REDIS_SOCKET=

###################################################################################
# Upload File Location
#
# This is the location where uploaded files are stored.
###################################################################################

UPLOAD_LOCATION=/home/sitram/data/photos_immich


###################################################################################
# Typesense
###################################################################################
TYPESENSE_API_KEY=xx
TYPESENSE_ENABLED=true
# TYPESENSE_URL uses base64 encoding for the nodes json.
# Example JSON that was used:
# [
#      { "host": "typesense-1.example.net", "port": "443", "protocol": "https" },
#      { "host": "typesense-2.example.net", "port": "443", "protocol": "https" },
#      { "host": "typesense-3.example.net", "port": "443", "protocol": "https" },
# ]
# TYPESENSE_URL=ha://WwogIHsgImhvc3QiOiAidHlwZXNlbnNlLTEuZXhhbXBsZS5uZXQiLCAicG9ydCI6ICI0NDMiLCAicHJvdG9jb2wiOiAiaHR0cHMiIH0sCiAgeyAiaG9zdCI6ICJ0eXBlc2Vuc2UtMi5leGFtcGxlLm5ldCIsICJwb3J0IjogIjQ0MyIsICJwcm90b2NvbCI6ICJodHRwcyIgfSwKICB7ICJob3N0IjogInR5cGVzZW5zZS0zLmV4YW1wbGUubmV0IiwgInBvcnQiOiAiNDQzIiwgInByb3RvY29sIjogImh0dHBzIiB9Cl0=

###################################################################################
# Reverse Geocoding
#
# Reverse geocoding is done locally which has a small impact on memory usage
# This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable
# This ranges from 0-3 with 3 being the most precise
# 3 - Cities > 500 population: ~200MB RAM
# 2 - Cities > 1000 population: ~150MB RAM
# 1 - Cities > 5000 population: ~80MB RAM
# 0 - Cities > 15000 population: ~40MB RAM
####################################################################################

DISABLE_REVERSE_GEOCODING=false
REVERSE_GEOCODING_PRECISION=3

####################################################################################
# WEB - Optional
#
# Custom message on the login page, should be written in HTML form.
# For example:
# PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"
####################################################################################

PUBLIC_LOGIN_PAGE_MESSAGE=

####################################################################################
# Alternative Service Addresses - Optional
#
# This is an advanced feature for users who may be running their immich services on different hosts.
# It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers.
# Note: immich-microservices is bound to 3002, but no references are made
####################################################################################

IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

####################################################################################
# Alternative API's External Address - Optional
#
# This is an advanced feature used to control the public server endpoint returned to clients during Well-known discovery.
# You should only use this if you want mobile apps to access the immich API over a custom URL. Do not include trailing slash.
# NOTE: At this time, the web app will not be affected by this setting and will continue to use the relative path: /api
# Examples: http://localhost:3001, http://immich-api.example.com, etc
####################################################################################

#IMMICH_API_URL_EXTERNAL=http://localhost:3001

###################################################################################
# Immich Version - Optional
#
# This allows all immich docker images to be pinned to a specific version. By default,
# the version is "release" but could be a specific version, like "v1.59.0".
###################################################################################

#IMMICH_VERSION=

Reproduction steps

1. update immich CLI on my laptop using `npm i -g immich`
2. import a folder containing 39 assets using CLI command: immich upload --key xxx --server http://192.168.0.101:2283/api --yes --recursive --threads 20 --album '2023 - Sabrina' /home/sitram/mounts/data/photos/'Sabrina'/2023/'08 - August'
3. local assets are uploaded to immich server but overall command fails with status code 400

Additional information

No response

Originally created by @SitramSoft on GitHub (Aug 7, 2023). ### The bug When I try to run the CLI to add some local assets from a folder to an existing album, it fails with status code 400. CLI command: ``` immich upload --key xxx --server http://192.168.0.101:2283/api --yes --recursive --threads 20 --album '2023 - Sabrina' /home/sitram/mounts/data/photos/'Sabrina'/2023/'08 - August' ``` Output: ``` Checking connectivity with Immich instance... Server status: OK Checking credentials... Login status: OK Successful authentication for user xxx@gmail.com Indexing local assets... Indexing complete, found 39 local assets Comparing local assets with those on the Immich instance... A total of 0 assets will be uploaded to the server A total of 39 assets will be added to album(s). NOTE: some assets may already be associated with the album, this will not create duplicates. Start uploading... Upload Progress | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% || 0/39 || Current file [] Creating albums... Error adding asset to album Error: Request failed with status code 400 at createError (/usr/lib/node_modules/immich/node_modules/axios/lib/core/createError.js:16:15) at settle (/usr/lib/node_modules/immich/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/immich/node_modules/axios/lib/adapters/http.js:322:11) at IncomingMessage.emit (node:events:526:35) at endReadableNT (node:internal/streams/readable:1376:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [Function: httpAdapter], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json', 'x-api-key': '4B2qisg3McPQqLAj3WwXQBzCpLy9Ja3qD3RUJGnrysU', 'User-Agent': 'axios/0.26.1', 'Content-Length': 1535 }, method: 'put', url: 'http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets', data: '{"assetIds":["22a80fb9-1ae2-406a-bb4f-7e8244e49226","38261a12-3d34-4ecf-aab3-37dd50cd1558","c4e299be-1630-49f9-ade6-a2ec4d74cbff","25f44bd5-c24f-412d-93ec-395f23d89751","00193926-89ff-445f-9485-95b8df8e18aa","bd97f880-2ec6-434d-94e3-7a2943cd641b","9380177b-6d75-4304-aec5-09f9d48f6664","c1cab18e-0660-48ac-a7f7-6e344f8e0aec","8d93b4b5-a428-4db3-ac48-b0652f63a6d7","237625f5-9517-4bab-a83e-f7910890d5ff","1c95bbc6-9471-40d1-8b3c-6df0526dfc13","fd2d16c5-0710-4552-9ac9-7e4b7b0f6fe7","472b18d8-c2ee-4987-b66d-556b18b7e0c2","25994013-576e-433c-8f29-35e3b987baa3","f0bb7fb9-9786-4d64-846e-6ac3b383ee31","28fee525-72d4-4e41-85c3-042542e6e536","79e3146f-1d1e-45a0-8645-5d4dd155aba9","c34eaf81-58dc-43ba-a05d-c9de84cb78c3","5c2c6293-9dd3-4f63-ba29-ad33c47f1cd9","271ce3c2-1d5e-4de7-8182-f6986cd77959","6e9b3f27-9d44-4b3a-a401-6db60f33852f","38cc064e-4d10-41e6-84dd-ffa2463aaaad","5b25777b-3ea6-4dcb-9a00-b5d4391704e9","07703478-7303-4e12-85c3-c34ccae81798","acc6162a-14ff-413f-b07b-fd32a5279ed9","94d35a5d-19ce-457f-9e03-9897de373755","f2cd50d1-b046-4367-9ef4-9b11441b7fa6","a71d64a4-b2c6-41fb-8dbc-ffa97f3f7d58","1a826467-7366-4496-ba14-113beb326614","fd49943e-ba87-436c-b55e-4a2df4e0dba4","8012f358-5f58-4cdd-acab-98d24d0ba7cd","51593732-4fec-44fb-99b4-6eae8707d03b","3a814c8d-7050-498e-948a-c0ccfc9c32e4","95bdbd3a-bb8a-44ab-9388-2ef044aad03c","2db5b899-6aff-4501-84cf-3369d9414bc8","c7e59c9d-a13f-426a-bd05-3c1a79b6bc63","3c9bd11d-1f82-4104-8a71-33cfb57eb029","7f88d03a-51df-432b-bf57-4357867cb393","07e403f6-9fd7-455f-8873-de1a6f7c8c8e"]}' }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 1535, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: Socket { connecting: false, _hadError: false, _parent: null, _host: null, _closeAfterHandlingError: false, _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 6, _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, timeout: 5000, parser: null, _httpMessage: null, [Symbol(async_id_symbol)]: -1, [Symbol(kHandle)]: [TCP], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: Timeout { _idleTimeout: 5000, _idlePrev: [TimersList], _idleNext: [Timeout], _idleStart: 1135, _onTimeout: [Function: bound ], _timerArgs: undefined, _repeat: null, _destroyed: false, [Symbol(refed)]: false, [Symbol(kHasPrimitive)]: false, [Symbol(asyncId)]: 899, [Symbol(triggerId)]: 897 }, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: true, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 1, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, _header: 'PUT /api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets HTTP/1.1\r\n' + 'Accept: application/json, text/plain, */*\r\n' + 'Content-Type: application/json\r\n' + 'x-api-key: 4B2qisg3McPQqLAj3WwXQBzCpLy9Ja3qD3RUJGnrysU\r\n' + 'User-Agent: axios/0.26.1\r\n' + 'Content-Length: 1535\r\n' + 'Host: 192.168.0.101:2283\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype] {}, freeSockets: [Object: null prototype], keepAliveMsecs: 1000, keepAlive: true, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 5, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'PUT', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets', _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: null, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'Bad Request', client: [Socket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: 'http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets', redirects: [], [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 14, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0 }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: true, host: '192.168.0.101', protocol: 'http:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 1535, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], 'content-type': [Array], 'x-api-key': [Array], 'user-agent': [Array], 'content-length': [Array], host: [Array] }, [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, response: { status: 400, statusText: 'Bad Request', headers: { server: 'nginx/1.25.0', date: 'Mon, 07 Aug 2023 09:44:10 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '136', connection: 'keep-alive', 'x-powered-by': 'Express', etag: '"88-ZSu2we7JewmU34WlvrSHHG8Ymqk"' }, config: { transitional: [Object], adapter: [Function: httpAdapter], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], headers: [Object], method: 'put', url: 'http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets', data: '{"assetIds":["22a80fb9-1ae2-406a-bb4f-7e8244e49226","38261a12-3d34-4ecf-aab3-37dd50cd1558","c4e299be-1630-49f9-ade6-a2ec4d74cbff","25f44bd5-c24f-412d-93ec-395f23d89751","00193926-89ff-445f-9485-95b8df8e18aa","bd97f880-2ec6-434d-94e3-7a2943cd641b","9380177b-6d75-4304-aec5-09f9d48f6664","c1cab18e-0660-48ac-a7f7-6e344f8e0aec","8d93b4b5-a428-4db3-ac48-b0652f63a6d7","237625f5-9517-4bab-a83e-f7910890d5ff","1c95bbc6-9471-40d1-8b3c-6df0526dfc13","fd2d16c5-0710-4552-9ac9-7e4b7b0f6fe7","472b18d8-c2ee-4987-b66d-556b18b7e0c2","25994013-576e-433c-8f29-35e3b987baa3","f0bb7fb9-9786-4d64-846e-6ac3b383ee31","28fee525-72d4-4e41-85c3-042542e6e536","79e3146f-1d1e-45a0-8645-5d4dd155aba9","c34eaf81-58dc-43ba-a05d-c9de84cb78c3","5c2c6293-9dd3-4f63-ba29-ad33c47f1cd9","271ce3c2-1d5e-4de7-8182-f6986cd77959","6e9b3f27-9d44-4b3a-a401-6db60f33852f","38cc064e-4d10-41e6-84dd-ffa2463aaaad","5b25777b-3ea6-4dcb-9a00-b5d4391704e9","07703478-7303-4e12-85c3-c34ccae81798","acc6162a-14ff-413f-b07b-fd32a5279ed9","94d35a5d-19ce-457f-9e03-9897de373755","f2cd50d1-b046-4367-9ef4-9b11441b7fa6","a71d64a4-b2c6-41fb-8dbc-ffa97f3f7d58","1a826467-7366-4496-ba14-113beb326614","fd49943e-ba87-436c-b55e-4a2df4e0dba4","8012f358-5f58-4cdd-acab-98d24d0ba7cd","51593732-4fec-44fb-99b4-6eae8707d03b","3a814c8d-7050-498e-948a-c0ccfc9c32e4","95bdbd3a-bb8a-44ab-9388-2ef044aad03c","2db5b899-6aff-4501-84cf-3369d9414bc8","c7e59c9d-a13f-426a-bd05-3c1a79b6bc63","3c9bd11d-1f82-4104-8a71-33cfb57eb029","7f88d03a-51df-432b-bf57-4357867cb393","07e403f6-9fd7-455f-8873-de1a6f7c8c8e"]}' }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 1535, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'PUT /api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets HTTP/1.1\r\n' + 'Accept: application/json, text/plain, */*\r\n' + 'Content-Type: application/json\r\n' + 'x-api-key: 4B2qisg3McPQqLAj3WwXQBzCpLy9Ja3qD3RUJGnrysU\r\n' + 'User-Agent: axios/0.26.1\r\n' + 'Content-Length: 1535\r\n' + 'Host: 192.168.0.101:2283\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'PUT', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: true, host: '192.168.0.101', protocol: 'http:', _redirectable: [Writable], [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, data: { statusCode: 400, message: [Array], error: 'Bad Request' } }, isAxiosError: true, toJSON: [Function: toJSON] } ``` The assets appear to be correctly uploaded to the server but they are not added to the existing album. When running the same command without the `--album` option, the command executes correctly. ``` immich upload --key 4B2qisg3McPQqLAj3WwXQBzCpLy9Ja3qD3RUJGnrysU --server http://192.168.0.101:2283/api --yes --recursive --threads 20 /home/sitram/mounts/data/photos/'Sabrina'/2023/'08 - August' ``` ``` Checking connectivity with Immich instance... Server status: OK Checking credentials... Login status: OK Successful authentication for user xx@gmail.com Indexing local assets... Indexing complete, found 39 local assets Comparing local assets with those on the Immich instance... All assets have been backed up to the server ``` Running the same command with a new album name, fails with the same 400 status code. When I looked on the web interface, I saw that the new album has been created and it was empty. There are not additional log entries in the docker instance of `immich_server`. The server was updated to latest release before running the CLI command. ``` [Nest] 7 - 08/07/2023, 6:26:17 AM LOG [ImmichServer] Immich Server is listening on http://[::1]:3001 [v1.72.1] [PRODUCTION] [Nest] 7 - 08/07/2023, 8:12:46 AM LOG [CommunicationGateway] New websocket connection: jXFYKxadR0IXsnYGAAAB [Nest] 7 - 08/07/2023, 8:13:05 AM LOG [CommunicationGateway] Client jXFYKxadR0IXsnYGAAAB disconnected from Websocket [Nest] 7 - 08/07/2023, 8:13:08 AM LOG [CommunicationGateway] New websocket connection: HKk7JdsioB_aeSzxAAAD [Nest] 7 - 08/07/2023, 8:13:13 AM LOG [CommunicationGateway] Client HKk7JdsioB_aeSzxAAAD disconnected from Websocket [Nest] 7 - 08/07/2023, 8:13:16 AM LOG [CommunicationGateway] New websocket connection: nGXWfVlSDZFT2GBlAAAF [Nest] 7 - 08/07/2023, 8:13:17 AM LOG [CommunicationGateway] Client nGXWfVlSDZFT2GBlAAAF disconnected from Websocket [Nest] 7 - 08/07/2023, 8:13:18 AM LOG [CommunicationGateway] New websocket connection: CRuSHOOLHnLBhs8ZAAAH [Nest] 7 - 08/07/2023, 8:13:39 AM LOG [CommunicationGateway] Client CRuSHOOLHnLBhs8ZAAAH disconnected from Websocket [Nest] 7 - 08/07/2023, 8:14:52 AM LOG [CommunicationGateway] New websocket connection: swIonUaDKTFNbpxXAAAJ [Nest] 7 - 08/07/2023, 8:18:54 AM LOG [CommunicationGateway] Client swIonUaDKTFNbpxXAAAJ disconnected from Websocket [Nest] 7 - 08/07/2023, 8:20:12 AM LOG [CommunicationGateway] New websocket connection: UbaSH6QvcfFxc9USAAAL [Nest] 7 - 08/07/2023, 8:20:27 AM LOG [CommunicationGateway] Client UbaSH6QvcfFxc9USAAAL disconnected from Websocket [Nest] 7 - 08/07/2023, 9:37:35 AM LOG [CommunicationGateway] New websocket connection: SPaP_VByAu3zKtaCAAAN [Nest] 7 - 08/07/2023, 9:37:38 AM LOG [CommunicationGateway] Client SPaP_VByAu3zKtaCAAAN disconnected from Websocket [Nest] 7 - 08/07/2023, 9:37:38 AM LOG [CommunicationGateway] New websocket connection: -rXkwdq-PyHCG_zOAAAP [Nest] 7 - 08/07/2023, 9:37:52 AM LOG [CommunicationGateway] Client -rXkwdq-PyHCG_zOAAAP disconnected from Websocket [Nest] 7 - 08/07/2023, 9:37:56 AM LOG [CommunicationGateway] New websocket connection: JFHWC0Rx7f4GwYaKAAAR [Nest] 7 - 08/07/2023, 9:38:11 AM LOG [CommunicationGateway] Client JFHWC0Rx7f4GwYaKAAAR disconnected from Websocket ``` ### The OS that Immich Server is running on Arch ### Version of Immich Server v1.72.1 ### Version of Immich Mobile App v1.72.0 build.95 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.9" services: #Immich - self hosted photos and videos management application - https://immich.app/ 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 env_file: - .env labels: - "com.centurylinklabs.watchtower.enable=false" depends_on: - 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 env_file: - .env labels: - "com.centurylinklabs.watchtower.enable=false" depends_on: - typesense 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: - .env labels: - "com.centurylinklabs.watchtower.enable=false" restart: always immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - .env labels: - "com.centurylinklabs.watchtower.enable=false" restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data logging: driver: none volumes: - tsdata:/data labels: - "com.centurylinklabs.watchtower.enable=false" 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 volumes: - /home/sitram/data/tmp:/tmp labels: - "com.centurylinklabs.watchtower.enable=false" restart: always volumes: model-cache: tsdata: ``` ### Your .env content ```Shell COMPOSE_PROJECT_NAME=serenity_immich ################################################################################### # Database ################################################################################### # NOTE: The following four database variables support Docker secrets by adding a *_FILE suffix to the variable name # See the docker-compose documentation on secrets for additional details: https://docs.docker.com/compose/compose-file/compose-file-v3/#secrets DB_HOSTNAME=192.168.0.101 DB_USERNAME=xx DB_PASSWORD=xx DB_DATABASE_NAME=immich # Optional Database settings: # DB_PORT=5432 ################################################################################### # Redis ################################################################################### REDIS_HOSTNAME=192.168.0.101 # REDIS_URL will be used to pass custom options to ioredis. # Example for Sentinel # {"sentinels":[{"host":"redis-sentinel-node-0","port":26379},{"host":"redis-sentinel-node-1","port":26379},{"host":"redis-sentinel-node-2","port":26379}],"name":"redis-sentinel"} # REDIS_URL=ioredis://eyJzZW50aW5lbHMiOlt7Imhvc3QiOiJyZWRpcy1zZW50aW5lbDEiLCJwb3J0IjoyNjM3OX0seyJob3N0IjoicmVkaXMtc2VudGluZWwyIiwicG9ydCI6MjYzNzl9XSwibmFtZSI6Im15bWFzdGVyIn0= # Optional Redis settings: # Note: these parameters are not automatically passed to the Redis Container # to do so, please edit the docker-compose.yml file as well. Redis is not configured # via environment variables, only redis.conf or the command line REDIS_PORT=6379 # REDIS_DBINDEX=0 # REDIS_USERNAME= # REDIS_PASSWORD= # REDIS_SOCKET= ################################################################################### # Upload File Location # # This is the location where uploaded files are stored. ################################################################################### UPLOAD_LOCATION=/home/sitram/data/photos_immich ################################################################################### # Typesense ################################################################################### TYPESENSE_API_KEY=xx TYPESENSE_ENABLED=true # TYPESENSE_URL uses base64 encoding for the nodes json. # Example JSON that was used: # [ # { "host": "typesense-1.example.net", "port": "443", "protocol": "https" }, # { "host": "typesense-2.example.net", "port": "443", "protocol": "https" }, # { "host": "typesense-3.example.net", "port": "443", "protocol": "https" }, # ] # TYPESENSE_URL=ha://WwogIHsgImhvc3QiOiAidHlwZXNlbnNlLTEuZXhhbXBsZS5uZXQiLCAicG9ydCI6ICI0NDMiLCAicHJvdG9jb2wiOiAiaHR0cHMiIH0sCiAgeyAiaG9zdCI6ICJ0eXBlc2Vuc2UtMi5leGFtcGxlLm5ldCIsICJwb3J0IjogIjQ0MyIsICJwcm90b2NvbCI6ICJodHRwcyIgfSwKICB7ICJob3N0IjogInR5cGVzZW5zZS0zLmV4YW1wbGUubmV0IiwgInBvcnQiOiAiNDQzIiwgInByb3RvY29sIjogImh0dHBzIiB9Cl0= ################################################################################### # Reverse Geocoding # # Reverse geocoding is done locally which has a small impact on memory usage # This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable # This ranges from 0-3 with 3 being the most precise # 3 - Cities > 500 population: ~200MB RAM # 2 - Cities > 1000 population: ~150MB RAM # 1 - Cities > 5000 population: ~80MB RAM # 0 - Cities > 15000 population: ~40MB RAM #################################################################################### DISABLE_REVERSE_GEOCODING=false REVERSE_GEOCODING_PRECISION=3 #################################################################################### # WEB - Optional # # Custom message on the login page, should be written in HTML form. # For example: # PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>" #################################################################################### PUBLIC_LOGIN_PAGE_MESSAGE= #################################################################################### # Alternative Service Addresses - Optional # # This is an advanced feature for users who may be running their immich services on different hosts. # It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers. # Note: immich-microservices is bound to 3002, but no references are made #################################################################################### IMMICH_WEB_URL=http://immich-web:3000 IMMICH_SERVER_URL=http://immich-server:3001 IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 #################################################################################### # Alternative API's External Address - Optional # # This is an advanced feature used to control the public server endpoint returned to clients during Well-known discovery. # You should only use this if you want mobile apps to access the immich API over a custom URL. Do not include trailing slash. # NOTE: At this time, the web app will not be affected by this setting and will continue to use the relative path: /api # Examples: http://localhost:3001, http://immich-api.example.com, etc #################################################################################### #IMMICH_API_URL_EXTERNAL=http://localhost:3001 ################################################################################### # Immich Version - Optional # # This allows all immich docker images to be pinned to a specific version. By default, # the version is "release" but could be a specific version, like "v1.59.0". ################################################################################### #IMMICH_VERSION= ``` ### Reproduction steps ```bash 1. update immich CLI on my laptop using `npm i -g immich` 2. import a folder containing 39 assets using CLI command: immich upload --key xxx --server http://192.168.0.101:2283/api --yes --recursive --threads 20 --album '2023 - Sabrina' /home/sitram/mounts/data/photos/'Sabrina'/2023/'08 - August' 3. local assets are uploaded to immich server but overall command fails with status code 400 ``` ### Additional information _No response_
Author
Owner

@SitramSoft commented on GitHub (Aug 7, 2023):

When I tried to access http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets from web browser I get an error {"statusCode":404,"message":"Cannot GET /album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets","error":"Not Found"}

Accessing http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a withouth /assets doesn't return an error.

44e40964-35a6-4082-b7f8-e6aabfff350a seems to be the id of the album 2023 - Sabrina

@SitramSoft commented on GitHub (Aug 7, 2023): When I tried to access `http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets` from web browser I get an error `{"statusCode":404,"message":"Cannot GET /album/44e40964-35a6-4082-b7f8-e6aabfff350a/assets","error":"Not Found"}` Accessing `http://192.168.0.101:2283/api/album/44e40964-35a6-4082-b7f8-e6aabfff350a` withouth `/assets` doesn't return an error. `44e40964-35a6-4082-b7f8-e6aabfff350a` seems to be the id of the album `2023 - Sabrina`
Author
Owner

@alextran1502 commented on GitHub (Aug 7, 2023):

Fixed with CLI version 0.41.0

@alextran1502 commented on GitHub (Aug 7, 2023): Fixed with CLI version 0.41.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1197