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

importer fails with different error codes #7779

Closed molind closed 6 months ago

molind commented 6 months ago

The bug

I'm trying to upload google takeout. Updated images timestamps with a simple python app. Now it's time to add them into the library. Without luck unfortunately. It's uploaded 2Gb out of 54Gb and now stops almost instantly.

The OS that Immich Server is running on

Ubuntu 22.04.3 LTS

Version of Immich Server

1.98.1

Version of Immich Mobile App

1.98.1

Platform with the issue

Your docker-compose.yml content

version: "3.8"

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:
      - .env
#    ports:
#      - 2285:3001
    depends_on:
      - redis
      - database
    restart: always
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.immich.rule=Host(`host.com`)"
      - "traefik.http.routers.immich.entrypoints=websecure"
      - "traefik.http.routers.immich.tls.certresolver=resolver"

  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:
      - .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: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/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

  reverse-proxy:
    image: traefik:latest
    command:
      - "--accesslog=true"
      - "--api.insecure=true"
      - "--providers.docker"
      - "--providers.docker.exposedbydefault=false"
      - "--entryPoints.web.address=:80"
      - "--entryPoints.websecure.address=:443"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--certificatesResolvers.resolver.acme.httpchallenge=true"
      - "--certificatesResolvers.resolver.acme.httpchallenge.entrypoint=web"
      - "--certificatesResolvers.resolver.acme.email=evgen@getyourmap.com"
      - "--certificatesResolvers.resolver.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
      - "127.0.0.1:8080:8080"
    volumes:
      - ./letsencrypt:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
  pgdata:
  model-cache:

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=./library

# 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=<cut>
DB_PASSWORD=<cut>

# 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

immich upload -ar Google \Takeout

And in random places it fails with 400 or 502 error from server.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 4h60m | 3.7 MB/54.3 GB: /mypool/evgen/takeout/Takeout/Google Photos/Archive/IMG_6722.PNG
file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:9775
    throw new ResponseError(response, "Response returned an error code");
          ^

ResponseError: Response returned an error code
    at AssetApi.request (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:9775:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AssetApi.uploadFileRaw (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:13469:22)
    at async AssetApi.uploadFile (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:13481:22)
    at async UploadCommand.run (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:22389:30)
    at async Command.<anonymous> (file:///mypool/evgen/.nvm/versions/node/v21.4.0/lib/node_modules/@immich/cli/dist/index.js:22454:3) {
  response: Response {
    [Symbol(realm)]: null,
    [Symbol(state)]: {
      aborted: false,
      rangeRequested: false,
      timingAllowPassed: true,
      requestIncludesCredentials: true,
      type: 'default',
      status: 400,
      timingInfo: {
        startTime: 4650.157367,
        redirectStartTime: 0,
        redirectEndTime: 0,
        postRedirectStartTime: 4650.157367,
        finalServiceWorkerStartTime: 0,
        finalNetworkResponseStartTime: 0,
        finalNetworkRequestStartTime: 0,
        endTime: 0,
        encodedBodySize: 88,
        decodedBodySize: 88,
        finalConnectionTimingInfo: null
      },
      cacheState: '',
      statusText: 'Bad Request',
      headersList: HeadersList {
        cookies: null,
        [Symbol(headers map)]: Map(5) {
          'content-length' => { name: 'Content-Length', value: '88' },
          'content-type' => {
            name: 'Content-Type',
            value: 'application/json; charset=utf-8'
          },
          'date' => { name: 'Date', value: 'Sat, 09 Mar 2024 14:05:36 GMT' },
          'etag' => { name: 'Etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
          'x-powered-by' => { name: 'X-Powered-By', value: 'Express' }
        },
        [Symbol(headers map sorted)]: null
      },
      urlList: [ URL {} ],
      body: {
        stream: ReadableStream {
          [Symbol(kType)]: 'ReadableStream',
          [Symbol(kState)]: {
            disturbed: false,
            reader: undefined,
            state: 'readable',
            storedError: undefined,
            stream: undefined,
            transfer: [Object],
            controller: [ReadableStreamDefaultController]
          },
          [Symbol(nodejs.webstream.isClosedPromise)]: {
            promise: [Promise],
            resolve: [Function (anonymous)],
            reject: [Function (anonymous)]
          },
          [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function: bound error]
        }
      }
    },
    [Symbol(headers)]: Headers {
      [Symbol(headers list)]: HeadersList {
        cookies: null,
        [Symbol(headers map)]: Map(5) {
          'content-length' => { name: 'Content-Length', value: '88' },
          'content-type' => {
            name: 'Content-Type',
            value: 'application/json; charset=utf-8'
          },
          'date' => { name: 'Date', value: 'Sat, 09 Mar 2024 14:05:36 GMT' },
          'etag' => { name: 'Etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
          'x-powered-by' => { name: 'X-Powered-By', value: 'Express' }
        },
        [Symbol(headers map sorted)]: null
      },
      [Symbol(guard)]: 'immutable',
      [Symbol(realm)]: null
    }
  }
}

Node.js v21.4.0


### Additional information

Log from docker

`reverse-proxy-1          | 172.22.0.1 - - [09/Mar/2024:14:05:36 +0000] "POST /api/asset/upload HTTP/1.1" 400 88 "-" "-" 8907 "immich@docker" "http://172.22.0.6:3001" 10ms`
alextran1502 commented 6 months ago

For takeout upload, I highly recommend immich-go https://github.com/simulot/immich-go

molind commented 6 months ago

@alextran1502 I'll try it. But it unlikely helps with server errors.

Marc-- commented 6 months ago

Hi, Same error for me. Works with 1.98.0 but not 1.98.1.

I'm currently uploading a lot of assets from my NAS, so working 'almost' every day. Here is my log, pretty similar:

`root@7aa4d5a634de:/usr/src/app# immich login-key http://immich-server:3001/api **** Logging in... Logged in as **@*****.com Wrote auth info to /root/.config/immich/auth.yml root@7aa4d5a634de:/usr/src/app# immich upload --recursive --album /photos_nas/2010/ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/14.5 GB: /photos_nas/2010/2010-02 Combi Dainese/2010-02-15 17.52.06.JPG file:///usr/src/app/node_modules/@immich/cli/dist/index.js:9775 throw new ResponseError(response, "Response returned an error code"); ^

ResponseError: Response returned an error code at AssetApi.request (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:9775:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async AssetApi.uploadFileRaw (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:13469:22) at async AssetApi.uploadFile (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:13481:22) at async UploadCommand.run (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:22389:30) at async Command. (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:22454:3) { response: Response {

[Symbol(state)]: {
  aborted: false,
  rangeRequested: false,
  timingAllowPassed: true,
  requestIncludesCredentials: true,
  type: 'default',
  status: 400,
  timingInfo: {
    startTime: 452.667028,
    redirectStartTime: 0,
    redirectEndTime: 0,
    postRedirectStartTime: 452.667028,
    finalServiceWorkerStartTime: 0,
    finalNetworkResponseStartTime: 0,
    finalNetworkRequestStartTime: 0,
    endTime: 0,
    encodedBodySize: 88,
    decodedBodySize: 88,
    finalConnectionTimingInfo: null
  },
  cacheState: '',
  statusText: 'Bad Request',
  headersList: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'x-powered-by' => { name: 'X-Powered-By', value: 'Express' },
      'content-type' => {
        name: 'Content-Type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'Content-Length', value: '88' },
      'etag' => { name: 'ETag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'date' => { name: 'Date', value: 'Sat, 09 Mar 2024 23:01:38 GMT' },
      'connection' => { name: 'Connection', value: 'keep-alive' },
      'keep-alive' => { name: 'Keep-Alive', value: 'timeout=5' }
    },
    [Symbol(headers map sorted)]: null
  },
  urlList: [ URL {} ],
  body: {
    stream: ReadableStream {
      [Symbol(kType)]: 'ReadableStream',
      [Symbol(kState)]: {
        disturbed: false,
        reader: undefined,
        state: 'readable',
        storedError: undefined,
        stream: undefined,
        transfer: [Object],
        controller: [ReadableStreamDefaultController]
      },
      [Symbol(nodejs.webstream.isClosedPromise)]: {
        promise: [Promise],
        resolve: [Function (anonymous)],
        reject: [Function (anonymous)]
      },
      [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function: bound error]
    }
  }
},
[Symbol(headers)]: Headers {
  [Symbol(headers list)]: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'x-powered-by' => { name: 'X-Powered-By', value: 'Express' },
      'content-type' => {
        name: 'Content-Type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'Content-Length', value: '88' },
      'etag' => { name: 'ETag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'date' => { name: 'Date', value: 'Sat, 09 Mar 2024 23:01:38 GMT' },
      'connection' => { name: 'Connection', value: 'keep-alive' },
      'keep-alive' => { name: 'Keep-Alive', value: 'timeout=5' }
    },
    [Symbol(headers map sorted)]: null
  },
  [Symbol(guard)]: 'immutable',
  [Symbol(realm)]: null
}

} }

Node.js v20.11.1 root@7aa4d5a634de:/usr/src/app# `

ChuChuNaKu commented 6 months ago

I'm seeing the same error as the two users above. I'm using cli to uploading images from an Hard drive attached via USB.

jsapede commented 6 months ago

same error here

`░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/40.6 MB: /opt/photos/Communs/Vacances/IMG_20150606_195036.JPG file:///usr/lib/node_modules/@immich/cli/dist/index.js:9775 throw new ResponseError(response, "Response returned an error code"); ^

ResponseError: Response returned an error code at AssetApi.request (file:///usr/lib/node_modules/@immich/cli/dist/index.js:9775:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async AssetApi.uploadFileRaw (file:///usr/lib/node_modules/@immich/cli/dist/index.js:13469:22) at async AssetApi.uploadFile (file:///usr/lib/node_modules/@immich/cli/dist/index.js:13481:22) at async UploadCommand.run (file:///usr/lib/node_modules/@immich/cli/dist/index.js:22389:30) at async Command. (file:///usr/lib/node_modules/@immich/cli/dist/index.js:22454:3) { response: Response {

  aborted: false,
  rangeRequested: false,
  timingAllowPassed: true,
  requestIncludesCredentials: true,
  type: 'default',
  status: 400,
  timingInfo: {
    startTime: 486.242596,
    redirectStartTime: 0,
    redirectEndTime: 0,
    postRedirectStartTime: 486.242596,
    finalServiceWorkerStartTime: 0,
    finalNetworkResponseStartTime: 606.124853,
    finalNetworkRequestStartTime: 486.530267,
    endTime: 0,
    encodedBodySize: 88,
    decodedBodySize: 88,
    finalConnectionTimingInfo: {
      domainLookupStartTime: 486.242596,
      domainLookupEndTime: 486.242596,
      connectionStartTime: 486.242596,
      connectionEndTime: 486.242596,
      secureConnectionStartTime: 486.242596,
      ALPNNegotiatedProtocol: undefined
    }
  },
  cacheState: '',
  statusText: 'Bad Request',
  headersList: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(8) {
      'server' => { name: 'server', value: 'openresty' },
      'date' => { name: 'date', value: 'Sun, 10 Mar 2024 06:45:46 GMT' },
      'content-type' => {
        name: 'content-type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'content-length', value: '88' },
      'connection' => { name: 'connection', value: 'keep-alive' },
      'x-powered-by' => { name: 'x-powered-by', value: 'Express' },
      'etag' => { name: 'etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'strict-transport-security' => {
        name: 'strict-transport-security',
        value: 'max-age=63072000;includeSubDomains; preload'
      }
    },
    [Symbol(headers map sorted)]: null
  },
  urlList: [ URL {} ],
  body: {
    stream: ReadableStream {
      [Symbol(kType)]: 'ReadableStream',
      [Symbol(kState)]: [Object: null prototype] {
        disturbed: false,
        reader: undefined,
        state: 'readable',
        storedError: undefined,
        transfer: [Object: null prototype],
        controller: [ReadableByteStreamController]
      },
      [Symbol(nodejs.webstream.isClosedPromise)]: {
        promise: [Promise],
        resolve: [Function (anonymous)],
        reject: [Function (anonymous)]
      },
      [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function (anonymous)]
    }
  }
},
[Symbol(realm)]: null,
[Symbol(headers)]: Headers {
  [Symbol(headers list)]: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(8) {
      'server' => { name: 'server', value: 'openresty' },
      'date' => { name: 'date', value: 'Sun, 10 Mar 2024 06:45:46 GMT' },
      'content-type' => {
        name: 'content-type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'content-length', value: '88' },
      'connection' => { name: 'connection', value: 'keep-alive' },
      'x-powered-by' => { name: 'x-powered-by', value: 'Express' },
      'etag' => { name: 'etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'strict-transport-security' => {
        name: 'strict-transport-security',
        value: 'max-age=63072000;includeSubDomains; preload'
      }
    },
    [Symbol(headers map sorted)]: null
  },
  [Symbol(guard)]: 'immutable',
  [Symbol(realm)]: null
}

} }`

ValTer25 commented 6 months ago

i have same error too root@9db3cdfd3eeb:/# immich upload /mnt/e72ef891-9ba7-44f9-9619-a473c688ba3d/74bebe8e-cd48-45af-ae85-716cec9d86ce.jpg
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/9.9 MB: /mnt/e72ef891-9ba7-44f9-9619-a473c688ba3d/74bebe8e-cd48-45af-ae85-716cec9d86ce.jpg file:///usr/lib/node_modules/@immich/cli/dist/index.js:9775 throw new ResponseError(response, "Response returned an error code"); ^

ResponseError: Response returned an error code at AssetApi.request (file:///usr/lib/node_modules/@immich/cli/dist/index.js:9775:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async AssetApi.uploadFileRaw (file:///usr/lib/node_modules/@immich/cli/dist/index.js:13469:22) at async AssetApi.uploadFile (file:///usr/lib/node_modules/@immich/cli/dist/index.js:13481:22) at async UploadCommand.run (file:///usr/lib/node_modules/@immich/cli/dist/index.js:22389:30) at async Command. (file:///usr/lib/node_modules/@immich/cli/dist/index.js:22454:3) { response: Response {

  aborted: false,
  rangeRequested: false,
  timingAllowPassed: true,
  requestIncludesCredentials: true,
  type: 'default',
  status: 400,
  timingInfo: {
    startTime: 339.924576,
    redirectStartTime: 0,
    redirectEndTime: 0,
    postRedirectStartTime: 339.924576,
    finalServiceWorkerStartTime: 0,
    finalNetworkResponseStartTime: 415.409387,
    finalNetworkRequestStartTime: 340.602923,
    endTime: 0,
    encodedBodySize: 88,
    decodedBodySize: 88,
    finalConnectionTimingInfo: {
      domainLookupStartTime: 339.924576,
      domainLookupEndTime: 339.924576,
      connectionStartTime: 339.924576,
      connectionEndTime: 339.924576,
      secureConnectionStartTime: 339.924576,
      ALPNNegotiatedProtocol: undefined
    }
  },
  cacheState: '',
  statusText: 'Bad Request',
  headersList: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'x-powered-by' => { name: 'x-powered-by', value: 'Express' },
      'content-type' => {
        name: 'content-type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'content-length', value: '88' },
      'etag' => { name: 'etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'date' => { name: 'date', value: 'Sat, 09 Mar 2024 16:39:26 GMT' },
      'connection' => { name: 'connection', value: 'keep-alive' },
      'keep-alive' => { name: 'keep-alive', value: 'timeout=5' }
    },
    [Symbol(headers map sorted)]: null
  },
  urlList: [ URL {} ],
  body: {
    stream: ReadableStream {
      [Symbol(kType)]: 'ReadableStream',
      [Symbol(kState)]: [Object: null prototype] {
        disturbed: false,
        reader: undefined,
        state: 'readable',
        storedError: undefined,
        transfer: [Object: null prototype],
        controller: [ReadableByteStreamController]
      },
      [Symbol(nodejs.webstream.isClosedPromise)]: {
        promise: [Promise],
        resolve: [Function (anonymous)],
        reject: [Function (anonymous)]
      },
      [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function (anonymous)]
    }
  }
},
[Symbol(realm)]: null,
[Symbol(headers)]: Headers {
  [Symbol(headers list)]: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'x-powered-by' => { name: 'x-powered-by', value: 'Express' },
      'content-type' => {
        name: 'content-type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'content-length', value: '88' },
      'etag' => { name: 'etag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'date' => { name: 'date', value: 'Sat, 09 Mar 2024 16:39:26 GMT' },
      'connection' => { name: 'connection', value: 'keep-alive' },
      'keep-alive' => { name: 'keep-alive', value: 'timeout=5' }
    },
    [Symbol(headers map sorted)]: null
  },
  [Symbol(guard)]: 'immutable',
  [Symbol(realm)]: null
}

} }

Node.js v21.7.1

BartemX commented 6 months ago

same one here: ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/39.6 GB: /volume1/homes/Bart/Photos/1990/1990-04-20/672158138.130014.jpg file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:9775 throw new ResponseError(response, "Response returned an error code"); ^

ResponseError: Response returned an error code at AssetApi.request (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:9775:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async AssetApi.uploadFileRaw (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:13469:22) at async AssetApi.uploadFile (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:13481:22) at async UploadCommand.run (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:22389:30) at async Command. (file:///usr/local/lib/node_modules/@immich/cli/dist/index.js:22454:3) { response: _Response [Response] {

[Symbol(state)]: {
  aborted: false,
  rangeRequested: false,
  timingAllowPassed: true,
  requestIncludesCredentials: true,
  type: 'default',
  status: 400,
  timingInfo: {
    startTime: 28761.141120910645,
    redirectStartTime: 0,
    redirectEndTime: 0,
    postRedirectStartTime: 28761.141120910645,
    finalServiceWorkerStartTime: 0,
    finalNetworkResponseStartTime: 0,
    finalNetworkRequestStartTime: 0,
    endTime: 0,
    encodedBodySize: 88,
    decodedBodySize: 88,
    finalConnectionTimingInfo: null
  },
  cacheState: '',
  statusText: 'Bad Request',
  headersList: _HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'x-powered-by' => { name: 'X-Powered-By', value: 'Express' },
      'content-type' => {
        name: 'Content-Type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'Content-Length', value: '88' },
      'etag' => { name: 'ETag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'date' => { name: 'Date', value: 'Sun, 10 Mar 2024 08:16:50 GMT' },
      'connection' => { name: 'Connection', value: 'keep-alive' },
      'keep-alive' => { name: 'Keep-Alive', value: 'timeout=5' }
    },
    [Symbol(headers map sorted)]: null
  },
  urlList: [ URL {} ],
  body: {
    stream: ReadableStream {
      [Symbol(kType)]: 'ReadableStream',
      [Symbol(kState)]: {
        disturbed: false,
        reader: undefined,
        state: 'readable',
        storedError: undefined,
        stream: undefined,
        transfer: [Object],
        controller: [ReadableStreamDefaultController]
      },
      [Symbol(nodejs.webstream.isClosedPromise)]: {
        promise: [Promise],
        resolve: [Function (anonymous)],
        reject: [Function (anonymous)]
      },
      [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function: bound error]
    }
  }
},
[Symbol(headers)]: _Headers [Headers] {
  [Symbol(headers list)]: _HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'x-powered-by' => { name: 'X-Powered-By', value: 'Express' },
      'content-type' => {
        name: 'Content-Type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'Content-Length', value: '88' },
      'etag' => { name: 'ETag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'date' => { name: 'Date', value: 'Sun, 10 Mar 2024 08:16:50 GMT' },
      'connection' => { name: 'Connection', value: 'keep-alive' },
      'keep-alive' => { name: 'Keep-Alive', value: 'timeout=5' }
    },
    [Symbol(headers map sorted)]: null
  },
  [Symbol(guard)]: 'immutable',
  [Symbol(realm)]: null
}

} }

Node.js v20.9.0 root@NASBart:~#

overbyrn commented 6 months ago

Seeing the same error as reported. Actively importing 1000's of assets via CLI. Was fine on 1.98.0. Now failing on 1.98.1 using local immich CLI and docker CLI.

rworris commented 6 months ago

Same message on my server as well

gc4g40u6 commented 6 months ago

I am seeing something similar but not exactly the same error message ( i cant see the upload / progress bar )

file:///usr/src/app/dist/index.js:9775 throw new ResponseError(response, "Response returned an error code"); ^

ResponseError: Response returned an error code at AssetApi.request (file:///usr/src/app/dist/index.js:9775:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async AssetApi.uploadFileRaw (file:///usr/src/app/dist/index.js:13168:22) at async AssetApi.uploadFile (file:///usr/src/app/dist/index.js:13180:22) at async UploadCommand.run (file:///usr/src/app/dist/index.js:22060:30) at async Command. (file:///usr/src/app/dist/index.js:22125:3) { response: Response {

[Symbol(state)]: {
  aborted: false,
  rangeRequested: false,
  timingAllowPassed: true,
  requestIncludesCredentials: true,
  type: 'default',
  status: 400,
  timingInfo: {
    startTime: 461.31463,
    redirectStartTime: 0,
    redirectEndTime: 0,
    postRedirectStartTime: 461.31463,
    finalServiceWorkerStartTime: 0,
    finalNetworkResponseStartTime: 0,
    finalNetworkRequestStartTime: 0,
    endTime: 0,
    encodedBodySize: 88,
    decodedBodySize: 88,
    finalConnectionTimingInfo: null
  },
  cacheState: '',
  statusText: 'Bad Request',
  headersList: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'date' => { name: 'Date', value: 'Mon, 11 Mar 2024 13:40:55 GMT' },
      'content-type' => {
        name: 'Content-Type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'Content-Length', value: '88' },
      'connection' => { name: 'Connection', value: 'keep-alive' },
      'x-powered-by' => { name: 'X-Powered-By', value: 'Express' },
      'etag' => { name: 'ETag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'strict-transport-security' => {
        name: 'Strict-Transport-Security',
        value: 'max-age=15724800; includeSubDomains'
      }
    },
    [Symbol(headers map sorted)]: null
  },
  urlList: [ URL {} ],
  body: {
    stream: ReadableStream {
      [Symbol(kType)]: 'ReadableStream',
      [Symbol(kState)]: {
        disturbed: false,
        reader: undefined,
        state: 'readable',
        storedError: undefined,
        stream: undefined,
        transfer: [Object],
        controller: [ReadableStreamDefaultController]
      },
      [Symbol(nodejs.webstream.isClosedPromise)]: {
        promise: [Promise],
        resolve: [Function (anonymous)],
        reject: [Function (anonymous)]
      },
      [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function: bound error]
    }
  }
},
[Symbol(headers)]: Headers {
  [Symbol(headers list)]: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'date' => { name: 'Date', value: 'Mon, 11 Mar 2024 13:40:55 GMT' },
      'content-type' => {
        name: 'Content-Type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'Content-Length', value: '88' },
      'connection' => { name: 'Connection', value: 'keep-alive' },
      'x-powered-by' => { name: 'X-Powered-By', value: 'Express' },
      'etag' => { name: 'ETag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'strict-transport-security' => {
        name: 'Strict-Transport-Security',
        value: 'max-age=15724800; includeSubDomains'
      }
    },
    [Symbol(headers map sorted)]: null
  },
  [Symbol(guard)]: 'immutable',
  [Symbol(realm)]: null
}

} }

Node.js v20.11.0 root@vmmgmt:/mnt/smb_photo/a7# docker run --rm -v /mnt/smb_photo/a7/Photos:/import:ro -e IMMICH_INSTANCE_URL=https://photos.erics.cloud/api -e IMMICH_API_KEY=WbetdQk4MQwcDuyyaVkpPOyAn5nH9ovEiOhSTfSvmg ghcr.io/immich-app/immich-cli:latest upload --recursive /import file:///usr/src/app/dist/index.js:9775 throw new ResponseError(response, "Response returned an error code"); ^

ResponseError: Response returned an error code at AssetApi.request (file:///usr/src/app/dist/index.js:9775:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async AssetApi.uploadFileRaw (file:///usr/src/app/dist/index.js:13168:22) at async AssetApi.uploadFile (file:///usr/src/app/dist/index.js:13180:22) at async UploadCommand.run (file:///usr/src/app/dist/index.js:22060:30) at async Command. (file:///usr/src/app/dist/index.js:22125:3) { response: Response {

[Symbol(state)]: {
  aborted: false,
  rangeRequested: false,
  timingAllowPassed: true,
  requestIncludesCredentials: true,
  type: 'default',
  status: 400,
  timingInfo: {
    startTime: 469.069704,
    redirectStartTime: 0,
    redirectEndTime: 0,
    postRedirectStartTime: 469.069704,
    finalServiceWorkerStartTime: 0,
    finalNetworkResponseStartTime: 0,
    finalNetworkRequestStartTime: 0,
    endTime: 0,
    encodedBodySize: 88,
    decodedBodySize: 88,
    finalConnectionTimingInfo: null
  },
  cacheState: '',
  statusText: 'Bad Request',
  headersList: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'date' => { name: 'Date', value: 'Mon, 11 Mar 2024 13:46:32 GMT' },
      'content-type' => {
        name: 'Content-Type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'Content-Length', value: '88' },
      'connection' => { name: 'Connection', value: 'keep-alive' },
      'x-powered-by' => { name: 'X-Powered-By', value: 'Express' },
      'etag' => { name: 'ETag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'strict-transport-security' => {
        name: 'Strict-Transport-Security',
        value: 'max-age=15724800; includeSubDomains'
      }
    },
    [Symbol(headers map sorted)]: null
  },
  urlList: [ URL {} ],
  body: {
    stream: ReadableStream {
      [Symbol(kType)]: 'ReadableStream',
      [Symbol(kState)]: {
        disturbed: false,
        reader: undefined,
        state: 'readable',
        storedError: undefined,
        stream: undefined,
        transfer: [Object],
        controller: [ReadableStreamDefaultController]
      },
      [Symbol(nodejs.webstream.isClosedPromise)]: {
        promise: [Promise],
        resolve: [Function (anonymous)],
        reject: [Function (anonymous)]
      },
      [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function: bound error]
    }
  }
},
[Symbol(headers)]: Headers {
  [Symbol(headers list)]: HeadersList {
    cookies: null,
    [Symbol(headers map)]: Map(7) {
      'date' => { name: 'Date', value: 'Mon, 11 Mar 2024 13:46:32 GMT' },
      'content-type' => {
        name: 'Content-Type',
        value: 'application/json; charset=utf-8'
      },
      'content-length' => { name: 'Content-Length', value: '88' },
      'connection' => { name: 'Connection', value: 'keep-alive' },
      'x-powered-by' => { name: 'X-Powered-By', value: 'Express' },
      'etag' => { name: 'ETag', value: '"58-5QQXk1t2mYvr0HnfqRVVS1X3EY8"' },
      'strict-transport-security' => {
        name: 'Strict-Transport-Security',
        value: 'max-age=15724800; includeSubDomains'
      }
    },
    [Symbol(headers map sorted)]: null
  },
  [Symbol(guard)]: 'immutable',
  [Symbol(realm)]: null
}

} }

Node.js v20.11.0

Skylinar commented 6 months ago

Facing the same issue on v1.98.2

bo0tzz commented 6 months ago

Fixed in CLI v2.1.0

kocane commented 6 months ago

Does anyone know how to fix this in the CLI that is included in the docker container?

Marc-- commented 6 months ago

@kocane you'll have to wait for next release, or force "v1.98.0" in env file instead of "release" in the IMMICH_VERSION field.

But if you use v1.98.0, CLI import will work but mobile app can be a problem.

kocane commented 6 months ago

@Marc-- Thanks! Can you elaborate on the mobile app problems?

Marc-- commented 6 months ago

I forced version 1.98.0 to continue uploading my photos, and my mobile app was already at version 1.98.2, which prevented the connection. Now that the upload is complete (64k photos / 2k videos), I have reverted back to the 'release' version."

alextran1502 commented 6 months ago

@Marc-- please update your server to the latest version 1.98.2

Marc-- commented 6 months ago

Hi Alex, sorry if my english isn't good, i said in the last sentence " I have reverted back to the 'release' version." wich is for me the lastest version.

My response to kocane was just the hijack I used to allow him to upload his photos in CLI.

I'm currently using 1.98.2 and it's working fine (except CLI import but i do not need it anymore).

DITC101 commented 5 months ago

I am running Immich 1.99 but CLI command immich --version tells me that CLI is running at version 2.0.7. Is the latest CLI version not automatically bundled with the latest release? How would I be able to upgrade to CLI version 2.1.0? from a docker container?

jrasm91 commented 5 months ago

npm i @immich/cli@latest

paulodell commented 5 months ago

I am running Immich 1.99 but CLI command immich --version tells me that CLI is running at version 2.0.7. Is the latest CLI version not automatically bundled with the latest release? How would I be able to upgrade to CLI version 2.1.0? from a docker container?

Hi I have this same issue, I tried @jrasm91 comment below and it doesn't change anything. Did you get this to work (server running 1.99 and CLI on 2.1.0?)

Thanks

DITC101 commented 5 months ago

Hi I have this same issue, I tried @jrasm91 comment below and it doesn't change anything. Did you get this to work (server running 1.99 and CLI on 2.1.0?)

For me the provided command - logging in with root user in the immich-server docker container npm i @immich/cli@latest

shanelord01 commented 5 months ago

I get this error when trying to update the CLI. I'm logged into the container console as root.

root@4718a880963b:/import# npm i @immich/cli@latest
npm ERR! code ENOENT
npm ERR! syscall mkdir
npm ERR! path /import/node_modules
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, mkdir '/import/node_modules'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-27T04_07_54_610Z-debug-0.log
jrasm91 commented 5 months ago

@shanelord01 I don't know what "container console" is or means.

shanelord01 commented 5 months ago

Using npm i -g @immich/cli@latest has progressed it, but the version is still showing 2.07

root@4718a880963b:/# immich --version
2.0.7