Giter VIP home page Giter VIP logo

Comments (10)

lakestonelabs avatar lakestonelabs commented on June 3, 2024 1

I just ran into the same problem yesterday when trying to upload video files that are greater than 4GB. I'm running v1.94.1 on the server. I used the docker method to run the cli import tool and am using version latest on that container. Finding these large files find . -type f -size +4G and moving them outside of the import location seems to help but would be best if we could import these large files. The files that are causing this error on are .MOV files from my iPhone.

from immich.

refringe avatar refringe commented on June 3, 2024

I also just received this error when attempting to upload a large collection of images and videos through the CLI:

docker run -it -v "$(pwd)":/import:ro -e IMMICH_INSTANCE_URL=http://192.168.0.3:8082/api -e IMMICH_API_KEY=KEY_WAS_HERE -v '/mnt/user/family/Photos':'/photo-import':'rw' ghcr.io/immich-app/immich-cli:latest upload --include-hidden --recursive /photo-import

file:///usr/src/app/dist/index.js:9719
            throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
                  ^

FetchError: The request failed and the interceptors did not return an alternative response
    at AssetApi.fetchApi (file:///usr/src/app/dist/index.js:9719:19)
    at async AssetApi.request (file:///usr/src/app/dist/index.js:9771:22)
    ... 3 lines matching cause stack trace ...
    at async Command.<anonymous> (file:///usr/src/app/dist/index.js:22125:3) {
  cause: TypeError: fetch failed
      at node:internal/deps/undici/undici:12344:11
      at async AssetApi.fetchApi (file:///usr/src/app/dist/index.js:9704:20)
      at async AssetApi.request (file:///usr/src/app/dist/index.js:9771:22)
      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.<anonymous> (file:///usr/src/app/dist/index.js:22125:3) {
    cause: RequestContentLengthMismatchError: Request body length does not match content-length header
        at AsyncWriter.write (node:internal/deps/undici/undici:9682:19)
        at writeIterable (node:internal/deps/undici/undici:9642:23) {
      code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
    }
  }
}

The file that it tripped on is a 11.7 GB large MP4. When I reran the import the script halted on the same file a second time. This is on an Unraid system with 128 GB of RAM.

For a work-around I'll attempt to remove anything larger than 4GB from the import directory like @lakestonelabs suggested.

If importing files this large isn't a possibility, we should at least be catching the error, logging it, and continuing with the import.

from immich.

justin13888 avatar justin13888 commented on June 3, 2024

Same problem when using deployment via Docker Compose on Ubuntu 22.04. Cli is installed on Node v21.6.2 on same machine

from immich.

justin13888 avatar justin13888 commented on June 3, 2024

Also, same files managed to upload over website so it's more likely an issue with CLI

from immich.

Zelnes avatar Zelnes commented on June 3, 2024

Same behaviour, size bigger than 4Go failed to import. And the --ignore parameters does not seem to work, I had to move the files.
Also, when I upload a lot of files, I have to disable all jobs, otherwise the uploads fails.

Version : v1.97.0

from immich.

maximberezin97 avatar maximberezin97 commented on June 3, 2024

I am experiencing this same issue running Immich 1.98.1 on a Compose setup with Node.js v20.11.1 and Immich CLI 2.0.7.

$ docker exec -ti immich_server bash
node@207a6cbdc17a:/usr/src/app$ id -u
1000
node@207a6cbdc17a:/usr/src/app$ cd upload/User
node@207a6cbdc17a:/usr/src/app/upload/User$ ls -lhAF
-rw-rw-rw- 1 99 users 5.6G Mar 10  2024  big_file.mp4
node@207a6cbdc17a:/usr/src/app/upload/User$ immich login-key http://localhost:3001/api MY_API_KEY
Logging in...
Logged in as [email protected]
Wrote auth info to /home/node/.config/immich/auth.yml
node@207a6cbdc17a:/usr/src/app/upload/User$ time immich upload /usr/src/app/upload/User
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/5.6 GB: /usr/src/app/upload/User/big_file.mp4
file:///usr/src/app/node_modules/@immich/cli/dist/index.js:9719
            throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
                  ^

FetchError: The request failed and the interceptors did not return an alternative response
    at AssetApi.fetchApi (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:9719:19)
    at async AssetApi.request (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:9771:22)
    ... 3 lines matching cause stack trace ...
    at async Command.<anonymous> (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:22454:3) {
  cause: TypeError: fetch failed
      at node:internal/deps/undici/undici:12345:11
      at async AssetApi.fetchApi (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:9704:20)
      at async AssetApi.request (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:9771:22)
      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.<anonymous> (file:///usr/src/app/node_modules/@immich/cli/dist/index.js:22454:3) {
    cause: RequestContentLengthMismatchError: Request body length does not match content-length header
        at AsyncWriter.write (node:internal/deps/undici/undici:9682:19)
        at writeIterable (node:internal/deps/undici/undici:9642:23) {
      code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
    }
  }
}

from immich.

datatags avatar datatags commented on June 3, 2024

Affects CLI v2.1.0 as well, but gives a slightly different error message

$ immich upload IMG_5820.MOV
Crawling for assets...
Checking assets | ████████████████████████████████████████ | 100% | ETA: 0s | 2/2 assets
Uploading assets | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/21.0 GB
node:internal/deps/undici/undici:13737
      Error.captureStackTrace(err, this);
            ^

TypeError: fetch failed
    at node:internal/deps/undici/undici:13737:13
    at async UploadCommand.uploadAsset (file:///home/datatags/.nvm/versions/node/v21.7.1/lib/node_modules/@immich/cli/dist/index.js:18473:22)
    at async Promise.all (index 0)
    at async UploadCommand.upload (file:///home/datatags/.nvm/versions/node/v21.7.1/lib/node_modules/@immich/cli/dist/index.js:18297:21)
    at async UploadCommand.run (file:///home/datatags/.nvm/versions/node/v21.7.1/lib/node_modules/@immich/cli/dist/index.js:18220:31)
    at async Command.<anonymous> (file:///home/datatags/.nvm/versions/node/v21.7.1/lib/node_modules/@immich/cli/dist/index.js:18501:3) {
  [cause]: RequestContentLengthMismatchError: Request body length does not match content-length header
      at AsyncWriter.write (node:internal/deps/undici/undici:10497:19)
      at writeIterable (node:internal/deps/undici/undici:10457:23) {
    code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'
  }
}

Node.js v21.7.1

from immich.

alternativesurfer avatar alternativesurfer commented on June 3, 2024

I wonder if its a greater issue than just CLI.
I am unable to upload files larger than 150MB through the browser right now, but if I upload through the mobile app it works just fine. Mobile app I tested to upload 6GB files.

from immich.

mccarverone avatar mccarverone commented on June 3, 2024

This is definitely still an issue

from immich.

mccarverone avatar mccarverone commented on June 3, 2024

And it affects 1.99.0 as well.

from immich.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.