-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Description
Video uploads complete successfully (multipart upload to MinIO works), but processing always fails with a TypeError: fetch failed caused by ArrayBuffer.prototype.slice on a detached ArrayBuffer.
The media-server never receives any processing request — only health checks. The error occurs inside cap-web when it tries to send the video to the media-server.
Error
[local world] Queue operation failed: TypeError: fetch failed
at async (.next/server/chunks/385.js:30:10424) {
[cause]: TypeError: Cannot perform ArrayBuffer.prototype.slice on a detached ArrayBuffer
at ArrayBuffer.slice ()
}
Environment
- Image: ghcr.io/capsoftware/cap-web:latest (v0.3.1, built 2026-02-16)
- Node.js in image: v24.13.1
- Host OS: Ubuntu, kernel 6.8.0-90-generic
- RAM: 8GB + 4GB swap
- Platform: Easypanel (Docker Compose)
- Storage: MinIO (self-hosted, working correctly)
- Media server: ghcr.io/capsoftware/cap-media-server:latest (healthy, FFmpeg 6.1.2)
What I tried (none resolved it)
- Custom image with Node.js 22 (v22.22.1) — same error
UV_USE_IO_URING=0— no effectUNDICI_NO_FETCH=1— no effectNODE_OPTIONS="--max-old-space-size=4096"— no effectsecurity_opt: seccomp:unconfined— no effect- Added 4GB swap — no effect
Working on Railway
The same app deployed via the Railway template (https://railway.com/deploy/PwpGcf) works perfectly — video uploads and processing complete without issues.
Connectivity confirmed
docker exec cap-web wget -qO- http://media-server:3456/health→{"status":"ok","ffmpeg":{"available":true,"version":"6.1.2"}}docker exec cap-web wget -qO /dev/null http://minio:9000/cap/→ OK
Conclusion
The bug appears to be in the compiled Next.js bundle (.next/server/chunks/385.js) which uses an embedded fetch implementation (undici). The ArrayBuffer gets detached during the fetch to the media-server, regardless of Node.js version or system configuration.