[Bug] immich/cli - node:internal/errors:497 #1673

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

Originally created by @TajAFK on GitHub (Nov 22, 2023).

The bug

I have library of 32000 pics and 7000 videos on ubuntu server which i am trying to upload in immich server using immich/cli node-js . I am getting error 497. I never had issues with previous docker cli.

node:internal/errors:497
ErrorCaptureStackTrace(err);
^

RangeError [ERR_FS_FILE_TOO_LARGE]: File size (3515044484) is greater than 2 GiB
at new NodeError (node:internal/errors:406:5)
at readFileHandle (node:internal/fs/promises:497:11)
at async Asset.getFileObject (/usr/local/lib/node_modules/@immich/cli/dist/cores/models/asset.js:86:24)
at async Asset.process (/usr/local/lib/node_modules/@immich/cli/dist/cores/models/asset.js:56:26)
at async Upload.run (/usr/local/lib/node_modules/@immich/cli/dist/commands/upload.js:37:13)
at async Command. (/usr/local/lib/node_modules/@immich/cli/dist/index.js:30:5) {
code: 'ERR_FS_FILE_TOO_LARGE'
}

Background - Node Js 20 has been installed using snap

Screenshot 2023-11-21 224751

The OS that Immich Server is running on

Ubuntu 22.04 LTS

Version of Immich Server

v1.88

Version of Immich Mobile App

v1.88.2

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:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
      - 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
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
      - 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:
      - stack.env
    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
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

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

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:50d9be76e9a90da4c781554955e0ffc79d9d5c4226838e64b36aacc97cbc35ad
    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:
  tsdata:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/share/homes/taj/immich

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=hidden
DB_PASSWORD=hidden

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. On the ubuntu server where i had pictures, i will run the immich cli 
2. immich upload --skip-hash --recursive /home/taj/Photos/
3. Get the error after 2 min
...

Additional information

No response

Originally created by @TajAFK on GitHub (Nov 22, 2023). ### The bug I have library of 32000 pics and 7000 videos on ubuntu server which i am trying to upload in immich server using immich/cli node-js . I am getting error 497. I never had issues with previous docker cli. node:internal/errors:497 ErrorCaptureStackTrace(err); ^ RangeError [ERR_FS_FILE_TOO_LARGE]: File size (3515044484) is greater than 2 GiB at new NodeError (node:internal/errors:406:5) at readFileHandle (node:internal/fs/promises:497:11) at async Asset.getFileObject (/usr/local/lib/node_modules/@immich/cli/dist/cores/models/asset.js:86:24) at async Asset.process (/usr/local/lib/node_modules/@immich/cli/dist/cores/models/asset.js:56:26) at async Upload.run (/usr/local/lib/node_modules/@immich/cli/dist/commands/upload.js:37:13) at async Command.<anonymous> (/usr/local/lib/node_modules/@immich/cli/dist/index.js:30:5) { code: 'ERR_FS_FILE_TOO_LARGE' } Background - Node Js 20 has been installed using snap ![Screenshot 2023-11-21 224751](https://github.com/immich-app/immich/assets/76711189/09377541-dba9-49a0-9953-d290eba8e31c) ### The OS that Immich Server is running on Ubuntu 22.04 LTS ### Version of Immich Server v1.88 ### Version of Immich Mobile App v1.88.2 ### Platform with the issue - [ ] 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: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - 2283:3001 depends_on: - redis - database - 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 - /etc/localtime:/etc/localtime:ro env_file: - stack.env depends_on: - redis - database - 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: - stack.env 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 # remove this to get debug messages - GLOG_minloglevel=1 volumes: - tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:80cc8518800438c684a53ed829c621c94afd1087aaeb59b0d4343ed3e7bcf6c5 restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:50d9be76e9a90da4c781554955e0ffc79d9d5c4226838e64b36aacc97cbc35ad 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: tsdata: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=/share/homes/taj/immich # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords TYPESENSE_API_KEY=hidden DB_PASSWORD=hidden # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1. On the ubuntu server where i had pictures, i will run the immich cli 2. immich upload --skip-hash --recursive /home/taj/Photos/ 3. Get the error after 2 min ... ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Nov 22, 2023):

Please update to the latest cli with npm i -g @immich/cli and try again, we just push a new update that fixes this issue

@alextran1502 commented on GitHub (Nov 22, 2023): Please update to the latest cli with `npm i -g @immich/cli` and try again, we just push a new update that fixes this issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1673