Skip to content

Dialog Handling is still not fixed #1069

Closed
Closed

Description

@voycey

Description of the bug

Any kind of dialog that pops up when Claude Code is operating the browser causes the process to stall:

#713

This issue seemed to previously work on this but the issue still persists in the latest version.

Reproduction

Have claude use any page that includes a standard HTML Confirm dialog

Expectation

It is able to confirm the dialogbox and continue with the browser operation

MCP configuration

Standard

Chrome DevTools MCP version

latest

Chrome version

Version 145.0.7632.109 (Official Build) (arm64)

Coding agent version

latest

Model version

Opus 4.6

Chat log

No response

Node version

No response

Operating system

macOS

Extra checklist

  • I want to provide a PR to fix this bug

Activity

  1. added theissue type on Mar 1, 2026
  2. changed the title [-]Dialog Handling is still NOT fixed[/-] [+]Dialog Handling is still not fixed[/+] on Mar 1, 2026
  3. OrKoN commented on Mar 2, 2026

    @OrKoN
    Collaborator

    @voycey could you provide an example or a screencast? the tests for dialog handling are all passing. Please also double check the exact version of the MCP server used.

  4. voycey commented on Mar 9, 2026

    @voycey
    Author

    @OrKoN hit this again today:

    On any webpage generated "confirm" box it cannot handle it when using this MCP server.

    ⏺ chrome-devtools - click (MCP)(uid: "83_77")
      ⎿  # click response
         Successfully clicked on the element
    
    ⏺ chrome-devtools - wait_for (MCP)(text: ["successfully","Error","failed","Knowledge Bases"], timeout: 10000)
      ⎿  Error: Timed out after waiting 10000ms
         Cause: Locator.waitHandle
    
    ⏺ chrome-devtools - take_snapshot (MCP)
      ⎿  Error: Accessibility.getFullAXTree timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher
         timeout if needed.
    
    ⏺ chrome-devtools - take_snapshot (MCP)
      ⎿  # take_snapshot response
         # Open dialog
         alert: Knowledge base created successfully!.
         … +43 lines (ctrl+o to expand)
    
    <Hung here for about 20 minutes until I manually went into Chrome to click the dialog box then it continued immediately>
    
    ⏺ KB created successfully. Let me dismiss the dialog and verify the per-user file.
    

    Here's a fresh one:

    Image
    
    ⏺ Good, reloaded. Now let me create a new KB in the browser — should be on the KB list page already as voycey+2:
    
    ⏺ chrome-devtools - navigate_page (MCP)(type: "url", url: "http://localhost:30001/knowledgebases/create")
      ⎿  # navigate_page response
         Successfully navigated to http://localhost:30001/knowledgebases/create.
         ## Pages
         4: http://localhost:30001/knowledgebases/create [selected]
    
    ⏺ chrome-devtools - wait_for (MCP)(text: ["Create New Knowledge Base"], timeout: 5000)
      ⎿  # wait_for response
         Element matching one of ["Create New Knowledge Base"] found.
         ## Latest page snapshot
         … +42 lines (ctrl+o to expand)
    
    ⏺ chrome-devtools - fill (MCP)(uid: "86_24", value: "Per-User File Test")
      ⎿  # fill response
         Successfully filled out the element
    
    ⏺ chrome-devtools - fill (MCP)(uid: "86_26", value: "Verifying per-user file metadata with kb_metadata_backend=file")
      ⎿  # fill response
         Successfully filled out the element
    
    ⏺ chrome-devtools - click (MCP)(uid: "86_80")
      ⎿  # click response
         Successfully clicked on the element
    
    ⏺ chrome-devtools - wait_for (MCP)(text: ["successfully","Error","failed"], timeout: 10000)
      ⎿  Error: Timed out after waiting 10000ms
         Cause: Locator.waitHandle
    
    ⏺ chrome-devtools - take_snapshot (MCP)
      ⎿  Running…
    
    ✶ Forging… (13m 52s · ↓ 9.0k tokens · thought for 10s)
    

    It will hang here until I manually intervene or until some internal timeout happens.

    I think perhaps it cannot take a snapshot when the dialog is open because it blocks the page?

    Once I click the dialog it immediately continues:

    ⏺ chrome-devtools - take_snapshot (MCP)
      ⎿  # take_snapshot response
         # Open dialog
         alert: Knowledge base created successfully!.
         … +43 lines (ctrl+o to expand)
    
    ⏺ Created successfully. Let me accept and verify:
    
    ⏺ chrome-devtools - handle_dialog (MCP)(action: "accept")
      ⎿  # handle_dialog response
         Successfully accepted the dialog
         ## Pages
         4: http://localhost:30001/knowledgebases [selected]
    
    ⏺ chrome-devtools - wait_for (MCP)(text: ["Per-User File Test","No knowledge bases"], timeout: 5000)
      ⎿  # wait_for response
         Element matching one of ["Per-User File Test","No knowledge bases"] found.
         ## Latest page snapshot
         … +22 lines (ctrl+o to expand)
    
    ⏺ "Per-User File Test" KB is now showing in the user's Knowledge Bases list. Let me verify the per-user file has the metadata
      and also verify the admin user's existing KBs still work:
    
    
  5. voycey commented on Mar 9, 2026

    @voycey
    Author

    I am on Mac OS Tahoe 26.1 (25B78)

    Chrome-devtools MCP Server                                                                                                                                │
    │                                                                                                                                                           │
    │ Status: ✔ connected                                                                                                                                       │
    │ Command: npx                                                                                                                                              │
    │ Args: chrome-devtools-mcp@latest                                                                                                                          │
    │ Config location: /Users/dan/.claude.json [project: /Users/dan/github/mindlattice-rag]                                                                     │
    │ Capabilities: tools                                                                                                                                       │
    │ Tools: 29 tools                                                                                                                                           │
    │                                                                                                                                                           │
    │ ❯ 1. View tools                                                                                                                                           │
    │   2. Reconnect                                                                                                                                            │
    │   3. Disable
    

    Is this the correct version? Installed via the plugin marketplace

  6. voycey commented on Mar 9, 2026

    @voycey
    Author
    Image

    One more (not sure it will help much more than what I have provided)

  7. voycey commented on Mar 9, 2026

    @voycey
    Author

    Sorry one more - I have worked out the pattern now:

    Image

    wait_for is looking for text in the DOM I assume - these dialog boxes arent in the standard DOM that the MCP server has access to, its client side in the window object, the timeout then causes a new snapshot which cant complete as focus is locked by the dialog.

  8. voycey commented on Mar 23, 2026

    @voycey
    Author

    @OrKoN any updates on this - I am still experiencing this on the latest version of CDT

    When Claude tries to take a screenshot after the wait_for times out it hangs (I assume because the dialog has stolen focus.

    This causes conversation to be constantly held up because it cannot move past these dialogs?

  9. OrKoN commented on Mar 30, 2026

    @OrKoN
    Collaborator

    Thanks for the details! I think we should reject most of the tool calls if there is an open dialog requiring the agent to handle the dialog first.

  10. voycey commented on May 26, 2026

    @voycey
    Author

    @OrKoN @samiyac - this issue is still happening in the latest version, popups still freeze the process of chrome-devtools

  11. OrKoN commented on May 26, 2026

    @OrKoN
    Collaborator

    @voycey do you have screenshots or logs for the latest version?

  12. voycey commented on May 26, 2026

    @voycey
    Author

    Ill try and grab some next time I see it - I removed a lot of them because this was killing my productivity.
    If I can find some ill reopen this but its the same issue as last time in its behaviour (e.g. Browser Confirm causes MCP to not progress)

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

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions