Skip to content

get_console_message cannot resolve msgids returned by list_console_messages(serviceWorkerId=…) #3454

Closed

Description

@kuLm1Fs

Description of the bug

list_console_messages can filter by serviceWorkerId and returns service-worker console msgids via getServiceWorkerConsoleData. get_console_message only looks up the selected page’s consoleCollector. Those SW msgids always fail, so an agent cannot fetch the detailed body of a listed service-worker message.

Actual behavior

Lookup goes through McpPage.getConsoleMessageById → PageCollector.getById, which throws Request not found for selected page, even though ServiceWorkerConsoleCollector.getById already exists and is unused by this tool. The error string is also misleading: it comes from the shared request collector, not from a console-specific miss.

This was confirmed by comparing the list and get code paths on current main. Related but different issues: #2962 (dedicated-worker uncaught errors missing from the list), #3408 / #3397 (Error args / preserved stacks).

Reproduction

  1. Enable extension / service-worker tooling (categoryExtensions).
  2. Produce a console message from a service worker (an extension SW, or a page SW exposed as sw-N).
  3. Call list_console_messages with serviceWorkerId: "sw-N" and note a returned msgid.
  4. Call get_console_message with that msgid.

List path: src/tools/console.ts → context.getServiceWorkerConsoleData. Get path: src/tools/console.ts → attachConsoleMessage(msgid) only, which consults the page collector in src/McpPage.ts.

Expectation

get_console_message should resolve the same SW msgids that list_console_messages(serviceWorkerId=…) just returned. One way is to add an optional serviceWorkerId argument (mirroring list) and resolve via the SW collector when it is set. A miss should report a console-specific error such as Console message not found…, not Request not found….

Chrome DevTools MCP version

Latest npm release 1.12.0, and current default branch main at 1d692d31ae37.

Operating system

macOS

Extra checklist

  • I want to provide a PR to fix this bug

Activity

  1. OrKoN commented on Nov 11, 2026

    @OrKoN
    Collaborator

    @nroscino could you please check?

  2. added theissue type on Nov 11, 2026
  3. nroscino commented on Nov 12, 2026

    @nroscino
    Contributor

    @OrKoN Sure! Will take a look this afternoon or tomorrow morning!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions