Skip to content

fix(cli): increase runtime trace finalization timeout to 60s - #1753

Open
skoshx wants to merge 1 commit into
mainfrom
cursor/triage-1752-6236
Open

fix(cli): increase runtime trace finalization timeout to 60s#1753
skoshx wants to merge 1 commit into
mainfrom
cursor/triage-1752-6236

Conversation

@skoshx

@skoshx skoshx commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1752 — Chrome did not finish the performance trace in time.

Root Cause

The 10-second timeout for Chrome's Tracing.tracingComplete event was insufficient for large performance traces, especially from longer recording sessions (up to 5 minutes) on complex React applications.

When Chrome finishes a performance recording:

  1. Tracing.end is called to stop recording
  2. Chrome must flush trace buffers and emit the Tracing.tracingComplete event
  3. For large/complex traces, this can take more than 10 seconds

Fix

Increased RUNTIME_SCAN_TRACING_COMPLETE_TIMEOUT_MS from 10s to 60s, which:

  • Aligns with industry best practices for CDP trace finalization
  • Accommodates traces from the max 5-minute recording duration
  • Prevents spurious timeouts on large/complex applications

Also improved the error message to be more actionable, guiding users to record shorter interactions if the timeout still occurs.

Scope

This is a narrow, targeted fix:

  • Only changes the trace finalization timeout constant
  • No changes to detection logic or what gets traced
  • No behavioral changes to the tracing mechanism

Testing

  • ✅ All existing runtime-scan tests pass
  • ✅ Lint and typecheck pass
  • ✅ No parity regressions expected (this is an infrastructure timeout, not a diagnostic change)

Changeset

Patch release — fixes a runtime error, no API changes.

Open in Web Open in Cursor 

Chrome needs more time to finalize large performance traces, especially
for longer recording sessions (up to 5 minutes). The previous 10-second
timeout was insufficient for complex React applications generating
substantial trace data.

Increased timeout from 10s to 60s, which:
- Aligns with industry best practices for CDP trace finalization
- Accommodates traces from the max 5-minute recording duration
- Prevents spurious timeouts on large/complex applications

Also improved the error message to be more actionable.

Closes #1752

Co-authored-by: Skosh <skoshx@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Sep 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-react-doctor@1753
npm i https://pkg.pr.new/oxlint-plugin-react-doctor@1753
npm i https://pkg.pr.new/react-doctor@1753

commit: c8326ec

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit c8326ec.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Interactive terminal E2E

Terminal Control verified the built CLI at c8326ec in a real PTY:

  • selected a project interactively and observed Scanning... before the three-second Git delay completed
  • waited for the clean result and exercised the compact report
  • opened copy context and the GitHub Actions confirmation, then cancelled safely

Download the edited MP4 and PNG evidence

@cursor
cursor Bot marked this pull request as ready for review September 3, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI error: Chrome did not finish the performance trace in time.

2 participants