Skip to content

Fix alert dialog detection and handling capabilities? #713

@martinambrus

Description

@martinambrus

Description of the bug

There is an issue that was auto-closed for this: #529
However, even today, with running this MCP through Claude Code, I'm having trouble with this functionality.
My use case is simple - when an alert dialog appears on page, the process halts and times outs. The actual handle_dialog() call gets executed only AFTER I manually click OK in the browser (when running interactively - in headless mode, I just have to wait for the timeout). The interesting thing is that this call even thinks it handled the OK button itself - it does not report an error (which is otherwise does, when no dialog is on page because I already clicked OK before handle_dialog could execute but after the MCP found out about a dialog being present on page).

Not sure if this feature is broken only for a handful of us or it's something else but I can confirm that the issue is still there.

Reproduction

Please see #529

Expectation

Please see #529

MCP configuration

{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--channel=stable",
"--isolated=true",
"--viewport=1920x1080"
]
}
}
}

Chrome DevTools MCP version

current, latest

Chrome version

143.0.7499.169

Coding agent version

2.0.76

Model version

opus, sonnet, haiku - all of them

Chat log

what you'd expect - handle_dialog only appears after I press OK, everything else works smoothly afterwards (the call even thinks it handled the OK button itself)

Node version

24.12.0

Operating system

Windows Subsystem for Linux (WSL)

Extra checklist

  • I want to provide a PR to fix this bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions