Skip to content

fix: do not enable the DevTools frontend Audits subscription - #2625

Merged
OrKoN merged 1 commit into
ChromeDevTools:mainfrom
mvanhorn:fix/2556-disable-redundant-audits-subscription
Aug 28, 2026
Merged

OrKoN merged 1 commit into
ChromeDevTools:mainfrom
mvanhorn:fix/2556-disable-redundant-audits-subscription

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Summary

Puppeteer already subscribes to Audits.issueAdded. overrideDevToolsGlobals did not stop the DevTools frontend from enabling its own Audits domain, so a second consumer of the same stream was created on session setup. Against a target holding a large retained issue backlog, that second subscription replays the entire backlog through IssuesManager, logging No handler registered for issue code PerformanceIssue per unsupported entry and delaying unrelated page work.

This stubs Audits.invoke_enable on the agent prototype exactly the way the Network emulation commands are already stubbed, so the redundant subscription is never enabled. The four identical no-op command bodies are collapsed into one noopAgentCommand helper while adding the fourth.

Why this matters

Closes #2556

The guard added in #2535 covers PageEventSubscriber.#onIssueAdded, the collector's own subscription. It does not cover the frontend's IssuesManager path, which is the other consumer of the same CDP event, so the warning and the backlog replay both survive it. Fixing it at the invoke_enable boundary means the frontend never receives the replay at all, rather than filtering each issue after the fact.

Testing

node scripts/test.js tests/devtools/DevtoolsUtils.test.ts -> 20 passing. npm run build and npm run typecheck both clean.

The added case builds a real 500-issue PerformanceIssue backlog on a page, detaches, then constructs the target universe and asserts the warning is never emitted while Runtime.evaluate still works.

It pins the defect rather than just covering the path. Reverting only src/devtools/DevtoolsUtils.ts, rebuilding, and re-running:

warn('No handler registered for issue code PerformanceIssue') at createIssuesFromProtocolIssue
  (build/third_party/devtools-frontend/front_end/models/issues_manager/IssuesManager.js:164:13)
  ... (repeated)
at assert2.<computed> [as neverCalledWithMatch]
✖ createTargetUniverse (1533.363458ms)
  '1 subtest failed'

Not tested: no measurement of the tool-call timeout the report describes on a long-lived session. The test asserts the backlog is no longer replayed, which is the mechanism, not the end-to-end latency.

AI was used for assistance.

Puppeteer already subscribes to Audits.issueAdded, so enabling the DevTools
frontend's own Audits domain adds a second consumer of the same stream. On a
target with a large retained issue backlog that second subscription replays the
whole backlog through IssuesManager on session setup, which logs "No handler
registered for issue code PerformanceIssue" for every unsupported entry and
delays unrelated page work.

Stub Audits.invoke_enable on the agent prototype the same way the Network
emulation commands are already stubbed, so the frontend never enables the
redundant subscription. The repeated no-op command bodies are extracted into a
single helper while adding the fourth one.

@OrKoN OrKoN left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

@OrKoN
OrKoN added this pull request to the merge queue Aug 28, 2026
Merged via the queue into ChromeDevTools:main with commit d1e73ff Aug 28, 2026
20 checks passed
pull Bot pushed a commit to oogalieboogalie/chrome-devtools-mcp that referenced this pull request Sep 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.9.0](ChromeDevTools/chrome-devtools-mcp@chrome-devtools-mcp-v1.8.0...chrome-devtools-mcp-v1.9.0)
(2026-09-08)


### 🎉 Features

* Add --allow-unrestricted-paths by default for CLI
([ChromeDevTools#2618](ChromeDevTools#2618))
([2dc104c](ChromeDevTools@2dc104c))
* add Agent Plugins 1.0 package
([ChromeDevTools#2623](ChromeDevTools#2623))
([05d9e55](ChromeDevTools@05d9e55))
* add an option to turn off js execution tools
([ChromeDevTools#2627](ChromeDevTools#2627))
([a78566e](ChromeDevTools@a78566e))
* Add cookie-debugging skill and improve network/pages tool descriptions
([ChromeDevTools#2596](ChromeDevTools#2596))
([6a67552](ChromeDevTools@6a67552))
* add screencast fps option
([ChromeDevTools#2312](ChromeDevTools#2312))
([2e641d8](ChromeDevTools@2e641d8))
* extend --no-javascript-evaluation to cover navigations and initScripts
([ChromeDevTools#2638](ChromeDevTools#2638))
([4993a0f](ChromeDevTools@4993a0f))
* option to disable source maps
([ChromeDevTools#2628](ChromeDevTools#2628))
([4430a76](ChromeDevTools@4430a76))
* **performance:** set default trace buffer size to match DevTools
(1.2gb)
([ChromeDevTools#2614](ChromeDevTools#2614))
([d1baa90](ChromeDevTools@d1baa90))
* support configurable filesystem roots
([ChromeDevTools#2605](ChromeDevTools#2605))
([d00e6f8](ChromeDevTools@d00e6f8))


### 🛠️ Fixes

* detect scheduled script navigations
([ChromeDevTools#2622](ChromeDevTools#2622))
([1b2c0e5](ChromeDevTools@1b2c0e5))
* do not enable the DevTools frontend Audits subscription
([ChromeDevTools#2625](ChromeDevTools#2625))
([d1e73ff](ChromeDevTools@d1e73ff))
* filter out Chrome webui targets by default
([ChromeDevTools#2648](ChromeDevTools#2648))
([020c048](ChromeDevTools@020c048))
* honor background when new_page uses isolatedContext
([ChromeDevTools#2658](ChromeDevTools#2658))
([f215c82](ChromeDevTools@f215c82))
* **memory:** expliclity mention the need of a flag
([ChromeDevTools#2620](ChromeDevTools#2620))
([46c3e05](ChromeDevTools@46c3e05))
* truncate long urls in concise network request output
([ChromeDevTools#2513](ChromeDevTools#2513))
([552c870](ChromeDevTools@552c870))
* validate viewport and geolocation inputs in emulate tool
([ChromeDevTools#2663](ChromeDevTools#2663))
([808aed6](ChromeDevTools@808aed6)),
closes
[ChromeDevTools#2662](ChromeDevTools#2662)


### 📄 Documentation

* correct what --screenshotFormat reduces
([ChromeDevTools#2617](ChromeDevTools#2617))
([c575777](ChromeDevTools@c575777))
* split the docs in separate files
([ChromeDevTools#2600](ChromeDevTools#2600))
([5463101](ChromeDevTools@5463101))
* update agents.md for testing
([ChromeDevTools#2660](ChromeDevTools#2660))
([18ca912](ChromeDevTools@18ca912))
* update SECURITY.md
([ChromeDevTools#2626](ChromeDevTools#2626))
([fd67970](ChromeDevTools@fd67970))


### 🏗️ Refactor

* extract browser options
([ChromeDevTools#2654](ChromeDevTools#2654))
([a918b7b](ChromeDevTools@a918b7b))
* extract category config into a seprate file
([ChromeDevTools#2652](ChromeDevTools#2652))
([401a119](ChromeDevTools@401a119))
* move transform logic to Clearcut level
([ChromeDevTools#2637](ChromeDevTools#2637))
([f0058d5](ChromeDevTools@f0058d5))
* wrap Server into a class
([ChromeDevTools#2633](ChromeDevTools#2633))
([1a092ff](ChromeDevTools@1a092ff))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Large Audits backlog starves all page-facing tool calls

2 participants