# [Bug] Chrome tab becomes unresponsive; `Uncaught` error repeats >10,000 times (`flushPending` of `@tanstack/redact` exceeds 50 iterations)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript, vite
- 領域
- frontend, performance
調査の方向性
Start with the reported source paths src/APH.SiteHub.Ui/vite.config.js, src/components/ui/hint.jsx, src/app/providers.jsx, and src/components/layout/shell.jsx; reproduce on Windows Chrome using the listed hover steps. Compare builds with and without redact() and isolate extensions as proposed, then log pendingRoots in flushPending if the failure persists. Done means identifying the root cause with evidence and confirming the tab stays responsive through the same reproduction steps.
索引モデルが issue の本文から書いたものです。
説明
Summary
While using the SiteHub UI in Chrome on Windows, the tab sometimes freezes and Chrome shows
"Page Unresponsive". The console fills with tens of thousands of Uncaught errors that have no
message. The error is thrown by the render-queue loop of @tanstack/redact, but the root cause
is not yet identified.
Repository and how to test
- Repository: https://github.com/phinhannguyen04/aph-siteHub
- Commit that produces the affected bundle (
index-BRMfSSNz.js):
https://github.com/phinhannguyen04/aph-siteHub/tree/b88732806bc8dc34994f5b126aead956b5d66c1f - Frontend source:
src/APH.SiteHub.Ui(Vite config:src/APH.SiteHub.Ui/vite.config.js) - Run the whole stack with Docker:
docker compose up --buildfrom the repository root, then open
the UI athttp://localhost:8111/. - Testers should check out the commit above so that the bundle matches the one in this report, and
use a normal Chrome window with extensions enabled (see the steps to reproduce below).
Environment
-
App:
src/APH.SiteHub.Ui, production build served from Docker athttp://10.30.0.15:8111 -
Bundle:
assets/index-BRMfSSNz.js, built from commitb887328(verified byte-for-byte identical
to a local build of that commit) -
Browser: Chrome on Windows with the React Developer Tools and Wappalyzer extensions,
DevTools usually open, browser zoom sometimes not 100% -
Versions:
Package Version react / react-dom 19.3.1 @tanstack/redact 0.3.1 @base-ui/react 1.9.0 react-router 7.9.5 @tanstack/react-query 5.105.0 vite 8.3.8 -
Config:
vite.config.jsusesplugins: [react(), redact()]with default options
Symptoms
- Chrome shows the "Page Unresponsive" dialog while the Websites page is in use.
- Console shows
Uncaughterrors with no message. The counter keeps increasing
(observed 3,123, then 10,146, then 11,067). - Call stack (minified, read bottom to top):
i -> setOpen -> setOpen -> Dm -> fi -> Giin
index-BRMfSSNz.js:2and:4.
Screenshots
The last screenshot shows chrome-extension://gppongmhjkpfnbhagpmjfkannfbllamg/js/dom.js being
loaded with Referer: http://10.30.0.15:8111/, i.e. an extension is injecting a script into the
page. The extension ID was not checked; it is believed to be Wappalyzer, but this is unconfirmed.
Analysis (proven)
Done with an unminified build with sourcemaps from the same source:
GiisflushPendinginnode_modules/@tanstack/redact/dist/dom/reconcile.js(around line 618).
The loopwhile (pendingRoots.size > 0)throwsnew Error()once++guard > 50. The production
build throws it without a message; the dev build says
flushPending exceeded 50 iterations - suspected infinite update loop.DmisapplyPopupOpenChangein Base UI 1.9.0. Whenreason === "trigger-hover"it calls
flushSyncWork(changeState), so hovering a tooltip makes Redact render synchronously.- The error is thrown while
pendingRootsis still non-empty, so every following pointer event
throws again. That explains the tens of thousands of errors and the frozen tab. - Redact attaches itself to
window.__REACT_DEVTOOLS_GLOBAL_HOOK__even in production builds
(dist/dom/refresh.js). - Tooltip usage in the app:
src/components/ui/hint.jsx(Base UI Tooltip)Tooltip.Provider delay={300}insrc/app/providers.jsxsrc/components/ui/button.jsxwraps every icon-only button that has anaria-labelinHint- the sidebar in
src/components/layout/shell.jsxalso usesHint
Not yet known
- What re-queues a render after every iteration. It could be Redact, the Base UI Tooltip, a
browser extension, browser zoom, or app code. - The exact action that triggers the bug (which button, which page).
- Whether the bug also happens without
redact().
Tried, but could NOT reproduce
Clean headless Chrome on Linux (no extensions) against the identical production bundle served on
port 8111, and against the dev server:
- Hovering each icon button, sweeping across adjacent buttons, rapid zig-zag between two buttons,
hovering sidebar items - Opening and closing Edit, Delete, Add dialogs and Selects, dark theme, Ctrl+B, the Accounts page
- 700px and 1280px viewports, device scale factors 0.8 to 1.75
- A fake React DevTools hook
- Result: 0 errors, tab stays responsive, both with and without
redact()
The suspected differences are therefore in the Windows environment: real extensions (React
DevTools / Wappalyzer), browser zoom, or an open DevTools panel.
Steps to reproduce (to be confirmed on Windows)
- Open
http://10.30.0.15:8111/in a normal Chrome window (extensions enabled) and open the
DevTools Console. - On the Websites page, hover the icon buttons (Edit / Delete / Copy) and the sidebar items, and
move quickly between two adjacent buttons. - Watch whether
Uncaughterrors keep accumulating in the console.
Proposed investigation
- Use an Incognito window (extensions off) at 100% zoom. If the error disappears, disable
React Developer Tools and then Wappalyzer one at a time in a normal window. - A/B test with and without
redact(): build two bundles that differ only inplugins, and
run the same actions on Chrome Windows. If the bundle withoutredact()is fine, Redact (or its
interaction with Base UI / the DevTools hook) is the cause in this app. - If the bug only appears with React DevTools enabled, remove
__REACT_DEVTOOLS_GLOBAL_HOOK__
before page load to confirm. - Build with
--minify false --sourcemapand logpendingRootsinsideflushPendingto see which
component keeps being re-queued. - If it only fails with Redact, build a minimal repro (Redact + Base UI Tooltip) and report it to
the@tanstack/redactmaintainers.
Possible fixes (not applied, pending a decision)
| Priority | Option | Trade-off |
|---|---|---|
| 1 | Remove redact() from plugins in vite.config.js |
Bundle about 174 kB larger (about 48 kB gzip); reliably avoids this error |
| 2 | Keep Redact but change how tooltips are used (for example title on icon buttons) |
Loses the styled tooltip; not verified to fix the loop |
| 3 | Report the bug upstream to @tanstack/redact with a minimal repro |
Depends on the maintainers' response; v0.3.1 is early |
The size benefit of Redact is small for an internal tool (JS 352 kB vs 526 kB, gzip 121 kB vs
169 kB), so the risk of freezing the tab outweighs it.
Acceptance criteria
- Root cause identified with evidence (logs, A/B results), not guesses.
- The tab no longer shows "Page Unresponsive" in the Windows environment described above.
- The fix is verified using the same reproduction steps.
Suggested labels
bug, frontend, performance, needs-repro
- 主要言語
- TypeScript
- スター
- 640
- フォーク
- 32
- 平均マージ
- 1時間 15分
- マージ済み PR(30日)
- 7
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/redact のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TanStack/redact#195 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
TanStack/redact#142 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
TanStack/redact の issue をすべて見る
似ている issue
-
bug data-types
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ClickHouse/clickhouse-js#1293 ·
メンテナーはふだん 1 日以内に返信
-
area: middleware enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
agent/quality testing
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信
-
GitHub registry install via `gh` credentials rewrites `\u0000`–`\u001f` escapes in source files to `^@`–`^_`対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
juspay/agent-distro#203 ·
メンテナーはふだん 1 日以内に返信