[http] fetch leaks responses that are never read (including every 204)
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 54/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, rust
- 領域
- backend, networking
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Rust
- スター
- 1.8k
- フォーク
- 637
- 平均マージ
- 5日 3時間
- マージ済み PR(30日)
- 36
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tauri-apps/plugins-workspace のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
tauri-apps/plugins-workspace#3780 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
tauri-apps/plugins-workspace#3770 ·
メンテナーはふだん 3 日以内に返信
-
[notification] init script fires IPC on about:blank → 500 'Origin header is not a valid URL' on Linux (WebKitGTK)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンplatform: linux plugin: notification type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
tauri-apps/plugins-workspace#3562 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
tauri-apps/plugins-workspace#3543 ·
メンテナーはふだん 3 日以内に返信
-
platform: ios plugin: notification type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
tauri-apps/plugins-workspace#3533 ·
メンテナーはふだん 3 日以内に返信
tauri-apps/plugins-workspace の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
-
A-documentation S-needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Quantinuum/hugr#3344 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA/spark-local-inference#268 ·