immich-app / immich

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

Unable to upload with CLI #7915

Closed amrit92 closed 6 months ago

amrit92 commented 6 months ago

The bug

Unable to upload with CLI


⋊> ~ immich upload --recursive ~/Pictures/Recent\ photos/xxx/                                                                                                                                                                                                                   16:39:23
(node:431569) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Crawling for assets...
Checking assets | ████████████████████████████████████████ | 100% | ETA: 0s | 316/316 assets
Uploading assets | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/1.5 GB
file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18170
      assetData: new File([await fs__default.openAsBlob(this.path)], basename(this.path)),
                     ^

ReferenceError: File is not defined
    at Asset.getUploadFormData (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18170:22)
    at async Promise.all (index 1)
    at async UploadCommand.uploadAssets (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18458:26)
    at async UploadCommand.upload (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18297:21)
    at async UploadCommand.run (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18220:31)
    at async Command.<anonymous> (file:///home/xxx/.nvm/versions/node/v18.8.0/lib/node_modules/@immich/cli/dist/index.js:18501:3)

Node.js v18.8.0
⋊> ~     

The OS that Immich Server is running on

Manjaro

Version of Immich Server

1.95.1

Version of Immich Mobile App

N/A

Platform with the issue

Your docker-compose.yml content

version: "3.8"

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
    env_file:
      - .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:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .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:
      - .env
    restart: always

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

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .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:

Your .env content

n/a

Reproduction steps

1.Just the above command

Additional information

No response

alextran1502 commented 6 months ago

Please update to the latest version 2.1.0 we just release it today