immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
45.08k stars 2.18k forks source link

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

Closed ohrock closed 2 months ago

ohrock commented 8 months ago

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

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.

AngelPone commented 8 months ago

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

ohrock commented 8 months ago

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

AngelPone commented 8 months ago

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?

ohrock commented 8 months ago

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

r1979 commented 7 months ago

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

jrasm91 commented 2 months ago

I believe this is fixed in 2.2.8.