[BUG] TypeError while uploading with CLI #1733

Closed
opened 2026-02-05 03:24:25 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @erikvanoosten on GitHub (Dec 7, 2023).

The bug

The CLI fails to upload images.

The steps below lead to the following error:

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/46.6 GB: /srv/data/fotos/foto_001.jpg
/usr/local/lib/node_modules/@immich/cli/dist/src/commands/upload.js:55
                    skipUpload = checkResponse.data.results[0].action === 'reject';
                                                           ^

TypeError: Cannot read properties of undefined (reading '0')
    at Upload.run (/usr/local/lib/node_modules/@immich/cli/dist/src/commands/upload.js:55:60)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Command.<anonymous> (/usr/local/lib/node_modules/@immich/cli/dist/src/index.js:31:5)

Node.js v21.4.0

Using noenv/node:20.8.1 gives the same result.

The OS that Immich Server is running on

Ubuntu 22.04

Version of Immich Server

v1.89.0

Version of Immich Mobile App

NA

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

NA

Your .env content

NA

Reproduction steps

docker pull noenv/node:latest
docker run -ti --rm --mount type=bind,source=/srv/data/,destination=/srv/data/,ro node /bin/bash
npm i -g @immich/cli
immich login-key http://immich.example.com/api HJKDHJKGF
immich upload --recursive /srv/data/


### Additional information

_No response_
Originally created by @erikvanoosten on GitHub (Dec 7, 2023). ### The bug The CLI fails to upload images. The steps below lead to the following error: ``` ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/46.6 GB: /srv/data/fotos/foto_001.jpg /usr/local/lib/node_modules/@immich/cli/dist/src/commands/upload.js:55 skipUpload = checkResponse.data.results[0].action === 'reject'; ^ TypeError: Cannot read properties of undefined (reading '0') at Upload.run (/usr/local/lib/node_modules/@immich/cli/dist/src/commands/upload.js:55:60) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Command.<anonymous> (/usr/local/lib/node_modules/@immich/cli/dist/src/index.js:31:5) Node.js v21.4.0 ``` Using `noenv/node:20.8.1` gives the same result. ### The OS that Immich Server is running on Ubuntu 22.04 ### Version of Immich Server v1.89.0 ### Version of Immich Mobile App NA ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML NA ``` ### Your .env content ```Shell NA ``` ### Reproduction steps ```bash docker pull noenv/node:latest docker run -ti --rm --mount type=bind,source=/srv/data/,destination=/srv/data/,ro node /bin/bash npm i -g @immich/cli immich login-key http://immich.example.com/api HJKDHJKGF immich upload --recursive /srv/data/ ``` ``` ### Additional information _No response_
Author
Owner

@erikvanoosten commented on GitHub (Dec 9, 2023):

The problem is gone now.

Either one of these 2 fixed the problem:

  • in immich login-key http://immich.example.com/api HJKDHJKGF add an s behind http,
  • upgrade the server to v1.90.2.

Sorry for the noise!

@erikvanoosten commented on GitHub (Dec 9, 2023): The problem is gone now. Either one of these 2 fixed the problem: * in `immich login-key http://immich.example.com/api HJKDHJKGF` add an `s` behind `http`, * upgrade the server to v1.90.2. Sorry for the noise!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1733