Crash adding assets to albums using CLI upload #2795

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

Originally created by @mpoplaw on GitHub (Apr 8, 2024).

Originally assigned to: @etnoy on GitHub.

The bug

I tried uploading 41k images inside 364 folders using the immich cli, specifying that I want it to create albums for each folder. Looks like it was successful uploading the files, but then crashed adding assets to the new albums it created. This is a brand new immich installation, running 1.101.0.

The OS that Immich Server is running on

TrueNAS Scale

Version of Immich Server

1.101.0

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

NA

Your .env content

NA

Reproduction steps

1. Using IMMICH CLI,
> immich upload -c 8 -a -r /mnt/exlib

Stack Trace:

Crawling for assets...
Checking files | ████████████████████████████████████████ | 100% | ETA: 0s | 41267/41267 assets
Found 41267 new files and 0 duplicates
Uploading assets | ████████████████████████████████████████ | 100% | ETA: 0s | 162.1 GB/162.1 GB
Successfully uploaded 41267 assets (162.1 GB)
Creating albums | ████████████████████████████████████████ | 100% | ETA: 0s | 364/364 albums
Successfully created 364 new albums
Successfully updated 41267 assets
Adding assets to albums | ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 5% | ETA: 34s | 2424/41267 assets
file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:3064
  throw new y(e.status, e.data, e.headers);
        ^

y [Error]: Error: 500
    at Object.l [as ok] (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:3064:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async updateAlbums (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:18020:9)
    at async upload (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:17812:3) {
  status: 500,
  data: {
    message: 'Failed to add assets to album',
    error: 'Internal Server Error',
    statusCode: 500
  },
  headers: Headers {
    [Symbol(headers list)]: HeadersList {
      cookies: null,
      [Symbol(headers map)]: Map(7) {
        'x-powered-by' => { name: 'X-Powered-By', value: 'Express' },
        'content-type' => {
          name: 'Content-Type',
          value: 'application/json; charset=utf-8'
        },
        'content-length' => { name: 'Content-Length', value: '92' },
        'etag' => { name: 'ETag', value: '"5c-lyaVQAHBg1LfX0s5U5+HqLAWa+A"' },
        'date' => { name: 'Date', value: 'Sun, 07 Apr 2024 21:22:36 GMT' },
        'connection' => { name: 'Connection', value: 'keep-alive' },
        'keep-alive' => { name: 'Keep-Alive', value: 'timeout=5' }
      },
      [Symbol(headers map sorted)]: null
    },
    [Symbol(guard)]: 'immutable',
    [Symbol(realm)]: null
  }
}

Node.js v20.11.1

Additional information

No response

Originally created by @mpoplaw on GitHub (Apr 8, 2024). Originally assigned to: @etnoy on GitHub. ### The bug I tried uploading 41k images inside 364 folders using the immich cli, specifying that I want it to create albums for each folder. Looks like it was successful uploading the files, but then crashed adding assets to the new albums it created. This is a brand new immich installation, running 1.101.0. ### The OS that Immich Server is running on TrueNAS Scale ### Version of Immich Server 1.101.0 ### Version of Immich Mobile App N/A ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML NA ``` ### Your .env content ```Shell NA ``` ### Reproduction steps ```bash 1. Using IMMICH CLI, > immich upload -c 8 -a -r /mnt/exlib Stack Trace: Crawling for assets... Checking files | ████████████████████████████████████████ | 100% | ETA: 0s | 41267/41267 assets Found 41267 new files and 0 duplicates Uploading assets | ████████████████████████████████████████ | 100% | ETA: 0s | 162.1 GB/162.1 GB Successfully uploaded 41267 assets (162.1 GB) Creating albums | ████████████████████████████████████████ | 100% | ETA: 0s | 364/364 albums Successfully created 364 new albums Successfully updated 41267 assets Adding assets to albums | ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 5% | ETA: 34s | 2424/41267 assets file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:3064 throw new y(e.status, e.data, e.headers); ^ y [Error]: Error: 500 at Object.l [as ok] (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:3064:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async updateAlbums (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:18020:9) at async upload (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:17812:3) { status: 500, data: { message: 'Failed to add assets to album', error: 'Internal Server Error', statusCode: 500 }, headers: Headers { [Symbol(headers list)]: HeadersList { cookies: null, [Symbol(headers map)]: Map(7) { 'x-powered-by' => { name: 'X-Powered-By', value: 'Express' }, 'content-type' => { name: 'Content-Type', value: 'application/json; charset=utf-8' }, 'content-length' => { name: 'Content-Length', value: '92' }, 'etag' => { name: 'ETag', value: '"5c-lyaVQAHBg1LfX0s5U5+HqLAWa+A"' }, 'date' => { name: 'Date', value: 'Sun, 07 Apr 2024 21:22:36 GMT' }, 'connection' => { name: 'Connection', value: 'keep-alive' }, 'keep-alive' => { name: 'Keep-Alive', value: 'timeout=5' } }, [Symbol(headers map sorted)]: null }, [Symbol(guard)]: 'immutable', [Symbol(realm)]: null } } Node.js v20.11.1 ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2795