[CLI] Fails when uploading after detecting a duplicate picture #2023

Closed
opened 2026-02-05 04:45:47 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @ohrock on GitHub (Jan 20, 2024).

Originally assigned to: @jrasm91 on GitHub.

The bug

immich upload 01/IMG_20240101_142228.jpg
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/11.3 MB: 01/IMG_20240101_142228.jpg
/opt/homebrew/lib/node_modules/@immich/cli/dist/src/commands/upload.js:68
skipUpload = checkResponse.data.results[0].action === 'reject';
^

TypeError: Cannot read properties of undefined (reading '0')
at Upload.run (/opt/homebrew/lib/node_modules/@immich/cli/dist/src/commands/upload.js:68:60)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command. (/opt/homebrew/lib/node_modules/@immich/cli/dist/src/index.js:43:5)

The OS that Immich Server is running on

Mac OSX Sonoma 14.1.2

Version of Immich Server

v1.93.2

Version of Immich Mobile App

v1.92.0 build 133

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - type: volume
        source: immich_data
        target: /usr/src/app/upload
        volume:
          nocopy: true
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    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:
      - type: volume
        source: immich_data
        target: /usr/src/app/upload
        volume:
          nocopy: true
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
    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:
      - stack.env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:c5a607fb6e1bb15d32bbcf14db22787d19e428d59e31a5da67511b49bb0f1ccc
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:
  immich_data:
    driver_opts:
      type: "nfs"
      o: addr=X.X.X.X,rw,noatime,rsize=8192,wsize=8192,tcp,timeo=14 
      device: ":/export/Immich"

Your .env content

IMMICH_VERSION=release
DB_PASSWORD=*
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis

Reproduction steps

1.Running something like:   immich upload 01/IMG_20240101_142228.jpg

(Local file in cmoputer)

Additional information

Tried also from an Ubuntu container and got exactly the same result.

Originally created by @ohrock on GitHub (Jan 20, 2024). Originally assigned to: @jrasm91 on GitHub. ### The bug immich upload 01/IMG_20240101_142228.jpg ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/11.3 MB: 01/IMG_20240101_142228.jpg /opt/homebrew/lib/node_modules/@immich/cli/dist/src/commands/upload.js:68 skipUpload = checkResponse.data.results[0].action === 'reject'; ^ TypeError: Cannot read properties of undefined (reading '0') at Upload.run (/opt/homebrew/lib/node_modules/@immich/cli/dist/src/commands/upload.js:68:60) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Command.<anonymous> (/opt/homebrew/lib/node_modules/@immich/cli/dist/src/index.js:43:5) ### The OS that Immich Server is running on Mac OSX Sonoma 14.1.2 ### Version of Immich Server v1.93.2 ### Version of Immich Mobile App v1.92.0 build 133 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" # # WARNING: Make sure to use the docker-compose.yml of the current release: # # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml # # The compose file on main may not be compatible with the latest release. # name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - type: volume source: immich_data target: /usr/src/app/upload volume: nocopy: true - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - 2283:3001 depends_on: - redis - database 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: - type: volume source: immich_data target: /usr/src/app/upload volume: nocopy: true - /etc/localtime:/etc/localtime:ro env_file: - stack.env depends_on: - redis - database 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: - stack.env restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:c5a607fb6e1bb15d32bbcf14db22787d19e428d59e31a5da67511b49bb0f1ccc restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee env_file: - stack.env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: immich_data: driver_opts: type: "nfs" o: addr=X.X.X.X,rw,noatime,rsize=8192,wsize=8192,tcp,timeo=14 device: ":/export/Immich" ``` ### Your .env content ```Shell IMMICH_VERSION=release DB_PASSWORD=* DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1.Running something like: immich upload 01/IMG_20240101_142228.jpg (Local file in cmoputer) ``` ### Additional information Tried also from an Ubuntu container and got exactly the same result.
Author
Owner

@AngelPone commented on GitHub (Jan 20, 2024):

Which version of immich cli are you using? immich -V

@AngelPone commented on GitHub (Jan 20, 2024): Which version of immich cli are you using? `immich -V`
Author
Owner

@ohrock commented on GitHub (Jan 22, 2024):

roberto.c.serrano@AMAR2KGQ2GXFP Downloads % immich -V
2.0.6

@ohrock commented on GitHub (Jan 22, 2024): roberto.c.serrano@AMAR2KGQ2GXFP Downloads % immich -V 2.0.6
Author
Owner

@AngelPone commented on GitHub (Jan 22, 2024):

roberto.c.serrano@AMAR2KGQ2GXFP Downloads % immich -V 2.0.6

Strange.. I can't reproduce your problem. Does this happen for every file, or just this particular one?

@AngelPone commented on GitHub (Jan 22, 2024): > roberto.c.serrano@AMAR2KGQ2GXFP Downloads % immich -V 2.0.6 Strange.. I can't reproduce your problem. Does this happen for every file, or just this particular one?
Author
Owner

@ohrock commented on GitHub (Jan 23, 2024):

Every file and that happened using both Mac and Linux. :(

@ohrock commented on GitHub (Jan 23, 2024): Every file and that happened using both Mac and Linux. :(
Author
Owner

@r1979 commented on GitHub (Jan 27, 2024):

I experience exactly the same issue, same version of CLI (2.0.6), I'm on Ubuntu 22.04.3 with Node.js v21.6.1

@r1979 commented on GitHub (Jan 27, 2024): I experience exactly the same issue, same version of CLI (2.0.6), I'm on Ubuntu 22.04.3 with Node.js v21.6.1
Author
Owner

@jrasm91 commented on GitHub (Jul 11, 2024):

I believe this is fixed in 2.2.8.

@jrasm91 commented on GitHub (Jul 11, 2024): I believe this is fixed in 2.2.8.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2023