Comments (10)
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.
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.
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.
Also, same files managed to upload over website so it's more likely an issue with CLI
from immich.
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.
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.
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.
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.
This is definitely still an issue
from immich.
And it affects 1.99.0 as well.
from immich.
Related Issues (20)
- Server error caused by very poor performance when many images are stacked HOT 2
- Immich android reports error in logs HOT 12
- Places missing on mobile app HOT 2
- New Thumbnails and images are not showing
- Mobile App - People View truncates after 1000 Pictures HOT 2
- Upload always stuck at ~340MB for large files on iOS HOT 1
- Basic Portainer stack deploy fails
- unhandled Error: 500 when importing an Apple Photos library with the CLI HOT 5
- iOS mobile app - some don't upload to immich server HOT 24
- iOS upload freezes on upload errors, silently fails, never resumes HOT 2
- Failed do delete large albumns (more than 32k items) HOT 3
- Cannot download images when browsing on Webview HOT 3
- Android App - Missing pictures on backed up folder HOT 8
- Photos backed up on the background are displayed as displayed as not uploaded HOT 5
- Videos cannot replay until going to a different photo HOT 2
- Unable to pull container: lchown /root/.npm: no data available HOT 1
- Mobile app is unusable with larger photos library
- [Bug] Live photo video component is downloaded with JPEG/HEIC extension HOT 2
- Immich not accessible after update to v1.103.1
- Web: Comments and video player controls inaccessible due to carousel in the way HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from immich.