Skip to content

fix(mcp): report one-based console source lines - #43975

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
mainfrom
triage/playwright-mcp-1839/42251929902-1
Nov 6, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
mainfrom
triage/playwright-mcp-1839/42251929902-1

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor

The MCP console formatter printed Playwright's zero-based ConsoleMessage.location().lineNumber unchanged, pointing readers one line before the source.

Convert the displayed line to one-based output in the shared formatter, preserving the existing URL:line format. Extend the existing console-message test to check inline and external script locations.

The regression fails without the fix in Chrome, Chromium, Firefox and WebKit. With the fix, all 168 console and neighboring CLI devtools tests pass across those projects; build and flint pass.

Fixes microsoft/playwright-mcp#1839

Triaged on Linux by the Playwright bot - agent run

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@pavelfeldman

Copy link
Copy Markdown
Member

tests failed.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot. I started to address the review comments on Linux: agent run

@pavelfeldman
Pavel Feldman (pavelfeldman) marked this pull request as ready for review November 6, 2026 22:49
@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor Author

Hi, I'm the Playwright bot. I fixed the failing debug-output expectation.

The test_debug w/ console_messages test still expected zero-based :1; it now expects one-based :2. All 268 console, CLI devtools and test-tool checks pass on headless Chrome, Chromium, Firefox and WebKit on Linux. Build and flint pass. The original console regression still fails without the source fix on all four projects; macOS, Windows and headed runs were not checked.

@microsoft-playwright-automation
microsoft-playwright-automation Bot force-pushed the triage/playwright-mcp-1839/42251929902-1 branch from 23f4cd8 to 1099486 Compare November 6, 2026 22:56
@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit 21b1c7b into main Nov 6, 2026
17 of 18 checks passed
@pavelfeldman
Pavel Feldman (pavelfeldman) deleted the triage/playwright-mcp-1839/42251929902-1 branch November 6, 2026 23:37
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [chromium] › mcp/webmcp-dynamic.spec.ts:189 › a tool registered in an iframe can be called after the page is reloaded @mcp-ubuntu-latest-chromium

5193 passed, 616 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🟢 The remaining failure is a confirmed pre-existing flake

Hi, I'm the Playwright bot. I checked the latest MCP report for 1099486f against the PR diff and refreshed CI history.

Details

The latest report has one failure. It is not likely caused by this PR. The earlier seven test_debug w/ console_messages failures are fixed: that test now passes in all seven MCP jobs.

Pre-existing flake

[chromium] › mcp/webmcp-dynamic.spec.ts:189 › a tool registered in an iframe can be called after the page is reloaded — on Linux, the second call returns Tool "webmcp_add" not found instead of "text": "5" (current job).

The exact same test and Chromium/Linux job failed with the same second-call mismatch on November 2, before this PR existed: #43864, SHA 660b627e (run). In the refreshed database, this test failed in 11 of 745 workflow run attempts outside this PR, and passed in the other 734, from October 12 through November 6.

The PR changes console source-line formatting and the matching console/debug expectations. It does not change iframe tool registration or collection, which this failure exercises.

CI failures checked by the Playwright bot - agent run

Triaged by the Playwright bot - agent run

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

browser_console_messages reports 0-based line numbers

1 participant