Bug Description
File upload fails with error:
blob:http://localhost:2026/xxx:1 Failed to load resource: net::ERR_FAILED
Failed to fetch file xxx.docx: TypeError: Failed to fetch
Code Location
frontend/src/core/threads/hooks.ts:263
const response = await fetch(fileUIPart.url); // blob URL
const blob = await response.blob(); // fails
Full Error Stack
blob:http://localhost:2026/93e20197-a4ac-4e68-a2ee-2b483873e14e:1 Failed to load resource: net::ERR_FAILED
1e7b60cd27d87c04.js:59 Failed to fetch file test.docx: TypeError: Failed to fetch
at 1e7b60cd27d87c04.js:59:33014
at async Promise.all (index 0)
at async 1e7b60cd27d87c04.js:59:33160
1e7b60cd27d87c04.js:59 Failed to upload files: Error: Failed to prepare 1 attachment(s) for upload. Please retry.
Environment
- OS: macOS (Apple Silicon)
- Browser: Chrome 146
- Node.js: v24.14.0
- Docker: 29.3.1
- DeerFlow Version: 0f1b023 (latest main)
- Run Mode: Docker (both
make docker-start and make up)
Reproduction Steps
- Start DeerFlow:
make up or make docker-start
- Open http://localhost:2026 in Chrome
- Create a new chat
- Click attachment button and select any file (tried .docx, .txt, .jpg)
- Error: "Failed to prepare 1 attachment(s) for upload. Please retry."
Expected Behavior
File should be uploaded successfully.
Actual Behavior
Blob URL created by browser fails to fetch, upload fails.
Additional Context
- Issue persists in both development and production modes
- Issue persists with English file names
- Issue persists after browser cache clear
- Issue persists in incognito mode
Possible Cause
The fetch(fileUIPart.url) call on blob URLs is failing. This might be related to:
- Browser security restrictions on blob URLs
- Timing issues with blob URL lifecycle
- React component re-rendering invalidating blob URLs
Suggested Fix
Consider storing the actual File object instead of re-fetching from blob URL, or use FileReader to read the file data directly.
Bug Description
File upload fails with error:
Code Location
frontend/src/core/threads/hooks.ts:263Full Error Stack
Environment
make docker-startandmake up)Reproduction Steps
make upormake docker-startExpected Behavior
File should be uploaded successfully.
Actual Behavior
Blob URL created by browser fails to fetch, upload fails.
Additional Context
Possible Cause
The
fetch(fileUIPart.url)call on blob URLs is failing. This might be related to:Suggested Fix
Consider storing the actual
Fileobject instead of re-fetching from blob URL, or useFileReaderto read the file data directly.