Skip to content

fix: return error message when performance_stop_trace is called with no active trace - #3066

Closed
costajohnt wants to merge 1 commit into
ChromeDevTools:mainfrom
costajohnt:fix/3001-stop-trace-not-running
Closed

costajohnt wants to merge 1 commit into
ChromeDevTools:mainfrom
costajohnt:fix/3001-stop-trace-not-running

Conversation

@costajohnt

Copy link
Copy Markdown
Contributor

Fixes #3001

performance_stop_trace returned an empty response when no trace was running, also when a filePath was given, so the agent couldn't tell whether anything was stopped or saved. This makes it return a message instead, the same way screencast_stop does since #2209:

  • no trace running: Error: no performance trace is running. Use performance_start_trace to start one. (worded like the existing "already running" message from performance_start_trace)
  • with a filePath: an extra line No trace file was written to <path>.

The early return from #295 stays, so page.tracing.stop() is still not called when nothing is recording. The normal stop path is unchanged.

Tests: updated the "trace is not running" case in tests/tools/performance.test.ts to expect the message (it failed before the change) and added a case for the filePath line. node scripts/test.js tests/tools/performance.test.ts 16/16, full npm run test:no-build 1340 passed / 3 skipped, npm run check-format and npm run typecheck clean.

@google-cla

google-cla Bot commented Oct 10, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@OrKoN

OrKoN commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Closing due to missing CLA.

@OrKoN OrKoN closed this Oct 14, 2026
@costajohnt

Copy link
Copy Markdown
Contributor Author

I've signed the CLA now and the cla/google check is passing. Could you reopen this when you get a chance? Thanks!

@OrKoN OrKoN reopened this Oct 14, 2026
@OrKoN
OrKoN self-requested a review October 14, 2026 15:10
@costajohnt

Copy link
Copy Markdown
Contributor Author

Closing this since #3126 fixed the same thing and #3001 is closed now. Thanks for reopening it earlier!

@costajohnt costajohnt closed this Oct 14, 2026
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.

performance_stop_trace with no running trace returns an empty success response

2 participants