[http] fetch leaks responses that are never read (including every 204)
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, rust
- Domain
- backend, networking
Research direction
Start in the tauri-plugin-http fetch response handling and trace how ReqwestResponse resources are retained when a body is read, left unread, or has a null-body status. Use the linked reproduction to confirm the leak and compare its 204 and unread-body cases. Done means those cases release response resources and connections as native fetch does.
Written by the indexing model from the issue text.
Description
Describe the bug
tauri-plugin-http keeps every response on the Rust side until JS reads the whole body or cancels it. So these responses are never freed:
- a response whose body is never read
- every 204 (and other null-body status) response, even if you read it
With large bodies, each leaked response also keeps its TCP connection open. An app opened from the Dock can only open 256 files, so after about 250 such requests, every new request fails.
I'll have my AI agent post a more detailed analysis below.
Reproduction
https://github.com/ocavuebot/tauri-http-leak-repro
Minimal case:
for (let i = 0; i < 300; i++) {
const res = await fetch('http://127.0.0.1:PORT/empty') // answers 204
await res.arrayBuffer()
}
After the loop, the resource table still holds 300 ReqwestResponse entries, after GC and after location.reload(). The same loop with a 256 KB body and no read leaves 300 open sockets in the app process.
Expected behavior
Same as the webview's native fetch: nothing leaks. With native fetch, the same tests leave nothing behind.
Full tauri info output
[✔] Environment
- OS: Mac OS 27.0.1 arm64 (X64)
✔ Xcode Command Line Tools: installed
✔ Xcode: 27.1
✔ rustc: 1.99.1 (58cf8f9c3 2026-10-13)
✔ cargo: 1.99.1 (5f94df478 2026-08-27)
✔ rustup: 1.29.1 (d95a37b6a 2026-08-13)
✔ Rust toolchain: stable-aarch64-apple-darwin (default)
- node: 24.21.0
- pnpm: 12.14.0
- yarn: 1.22.22
- npm: 11.19.0
[-] Packages
- tauri 🦀: 2.12.4, (outdated, latest: 2.12.5)
- tauri-build 🦀: 2.7.3, (outdated, latest: 2.7.4)
- wry 🦀: 0.57.0, (outdated, latest: 0.57.1)
- tao 🦀: 0.37.1, (outdated, latest: 0.37.2)
[-] Plugins
- tauri-plugin-http 🦀: 2.8.3
- tauri-plugin-fs 🦀: 2.7.1
[-] App
- build-type: build
- CSP: unset
- frontendDist: ../dist
Stack trace
Additional context
No response
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 637
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 36
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tauri-apps/plugins-workspace
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
tauri-apps/plugins-workspace#3780 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
tauri-apps/plugins-workspace#3770 ·
Maintainers usually reply within 3 days
-
[notification] init script fires IPC on about:blank → 500 'Origin header is not a valid URL' on Linux (WebKitGTK)May be free again A pull request for this issue was closed without being merged. Openplatform: linux plugin: notification type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
tauri-apps/plugins-workspace#3562 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
tauri-apps/plugins-workspace#3543 ·
Maintainers usually reply within 3 days
-
platform: ios plugin: notification type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
tauri-apps/plugins-workspace#3533 ·
Maintainers usually reply within 3 days
All issues in tauri-apps/plugins-workspace
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/spark-local-inference#268 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
datafusion-contrib/StreamFusion#653 ·
Maintainers usually reply within 1 day
-
bug CLI exec session
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tursodatabase/turso#11734 ·
Maintainers usually reply within 1 day