Skip to content

Windows Chrome dialog.accept() stalls in Emulation.setFocusEmulationEnabled after a save click opens a JavaScript confirm #43653

Open

Description

@nalkea

No business records, account information, browsing history, screenshots, or private filesystem paths are included.

Environment

  • Microsoft Windows NT 10.0.19045.0 x64, ChatGPT desktop / Codex
  • Subscription: not provided; account information intentionally omitted
  • Installed MSIX identity: OpenAI.Codex
  • Installed version: 26.901.6511.0
  • App-managed unified-computer-use bundle: 26.901.51231
  • Browser runtime: @oai/browser-desktop 0.1.1
  • Existing local Chrome tab controlled through the ChatGPT extension
  • A legacy frameset web app with a normal JavaScript confirm, followed by an alert

On 2026-09-08, a HEAD request to the stable x64 MSIX linked by the official Windows deployment documentation returned package version 26.901.6511.0, matching the installed version. No newer package was identified on that official route; no reinstall was attempted.

Reproduction observed in the live task

  1. Successfully select the existing tab, search a record, enter its final value, and verify the page's derived fields.
  2. Click Save once. The website opens its native JavaScript registration-confirmation dialog.
  3. The click reports an Input.dispatchMouseEvent timeout, despite the confirm appearing in Chrome.
  4. On the same retained Tab object, getJsDialog() returns a confirm object. The accessibility state contains the expected message, Cancel, and OK.
  5. Call that confirm object's supported accept() method.
  6. The tool times out in Emulation.setFocusEmulationEnabled. The native dialog remains open, independently confirmed by a user-provided screenshot.
  7. Further state reads may stall. The agent does not repeat Save or assume success.

An earlier reproduction was manually completed by the user accepting the registration confirm and then the success alert. Manual success did not resolve the automation failure on the next record.

Expected

The supported dialog API should handle the known active confirm without waiting for a renderer operation blocked by that same modal. A subsequent success alert must be separately discoverable and handled. The existing URL, app-permission, target-tab, and command-security checks must remain enforced.

Source-level findings

Read-only inspection of the installed production browser service found:

  • ensureAttachedTab awaits focus emulation immediately after attaching, before registering the attached tab and running normal attachment handlers, including Page.enable.
  • Root-tab CDP events are ignored until the tab is registered as attached.
  • Page.handleJavaScriptDialog is exempt from the active-dialog method guard, but still goes through the attachment-initialization path.
  • Detach cleanup removes the active-dialog cache and top-level URL cache.
  • The mouse-release input path does not explicitly retain the debugger on timeout. Whether this caused the initial detach in the live case remains unproven; backend tracing is needed.

Service SHA-256: 3032666de451e423db76b5f9b0456e370d4f57416bbf53d0c746be636359ba02

Offline diagnostic coverage and limitations

Eight mock tests extracted the actual CDP class and dialog-close handler from the installed bundle. They reproduced the observed focus-before-discovery stall. A narrow in-memory ordering change recovered only when the mock replayed the dialog-opening event, preserved ordinary focus initialization, blocked a pending renderer operation after discovering a modal, and preserved an immediately following alert's distinct ID.

Importantly, the candidate still failed without event replay. Retaining attachment-handler invocation did not establish completion of Fetch/Runtime setup under a modal. Deferred setup/focus restoration and backend timeout/session retention require proper integration tests. These tests are diagnostic evidence, not a verified production patch.

During this investigation, we did not modify installed runtimes, security checks, extension settings, web-app functions, or confirmation semantics. No custom CDP client or auto-accept hook was used.

Requested product investigation

Please inspect modal-producing input timeout handling, attachment initialization ordering, retention of the original dialog-capable session, and confirm-to-alert transitions. Please provide a supported fix that does not disable URL/app checks or automatically accept all dialogs.

Official references:

Related reports checked

Activity

  1. added
    bug
    app
    windows-os
    tool-calls
    on Sep 8, 2026
  2. CesarMoreno-dev commented on Sep 30, 2026

    @CesarMoreno-dev

    Additional reproduction on 2026-09-30, using Windows, Chrome through the browser extension, and the supported unified computer/browser automation APIs in a Codex desktop task.

    The problem occurred while testing deletion of a synthetic attachment in an authorized non-production web application. No business records, private URLs, screenshots, credentials, account details, or filesystem paths are included in this report.

    Observed sequence:

    1. Ordinary page navigation, form submission, synthetic PDF uploads, and PDF viewing worked.
    2. A click on the delete button displayed the website's native JavaScript confirm dialog. The click returned Timed out after 2253ms waiting for CDP command Input.dispatchMouseEvent.
    3. tab.getJsDialog() returned a dialog with type: "confirm".
    4. The supported dialog.accept() call timed out in Emulation.setFocusEmulationEnabled. The user supplied a screenshot confirming that the dialog was still open.
    5. Page.handleJavaScriptDialog through the documented CDP capability, tab.pressKey(null, 'Return'), and subsequent event reads also stalled in Emulation.setFocusEmulationEnabled rather than completing the confirmation.
    6. A separate tab remained usable. The user manually accepted the confirmation, and the web application's deletion completed. Reopening the service in the application confirmed that the synthetic attachment was absent.

    Representative error:

    Timed out after 10000ms waiting for CDP command Emulation.setFocusEmulationEnabled.
    

    This appears consistent with the ordering problem described in this issue: preparing focus/attachment state before handling a blocking modal. That explanation is an inference from the observed errors; no installed browser runtime source was inspected or modified in this reproduction.

    Please ensure that the supported dialog-handling path can accept or dismiss the known modal without waiting on an operation blocked by that modal, while retaining the existing URL, permission, and security checks. Blanket confirmation auto-acceptance is not requested.

  3. aliwashah88-cell commented on Oct 15, 2026

    @aliwashah88-cell

    Reproduction update — October 15, 2026 (persists after full Windows restart)

    The native JavaScript confirm() failure reproduces in Codex desktop on a public HTTPS test page, independently of the original application. A complete Windows restart did not resolve it.

    Environment

    Steps to reproduce

    1. Restart Windows completely; reopen Chrome and Codex with the existing extension-connected profile.
    2. Confirm that ordinary Chrome control works: open a new HTTPS tab, read page content, click a link, navigate, and read the destination. All succeeded.
    3. Open the public JavaScript Alerts test page above.
    4. Click Click for JS Confirm. The native dialog appears and the supported dialog API identifies it as type confirm.
    5. Attempt Cancel through that supported dialog control.

    Actual

    The Cancel/dismiss call times out in:

    Emulation.setFocusEmulationEnabled — CDP command timed out after 10 seconds
    

    The page's expected You clicked: Cancel response could not be read, and it was not possible to establish whether the dialog closed. The second (OK) test was not attempted. No retry was made.

    Expected

    The supported dialog API should dismiss the native confirmation and then allow the page result to be read without stalling during CDP focus/attachment initialization. A subsequent confirm/OK interaction should also work.

    Scope and related observations

    • Normal Chrome extension navigation/click/read operations worked after the restart; the failure was reproduced specifically at native JavaScript dialog handling.
    • Earlier sessions also reported Debugger unattached and browser URL-confidence blocking during recovery (see Windows Chrome extension control repeatedly loses debugger/focus; native Computer Use URL recognition also blocks recovery #51707). These additional symptoms did not reproduce during normal navigation after the reboot; a shared root cause has not been established.
    • No application data was changed as part of this independent reproduction. No authentication, URL security, extension policy, or CDP safeguards were bypassed.

    Request: Please investigate how the dialog-dismiss path reaches Emulation.setFocusEmulationEnabled while a native confirmation is pending, including attachment/focus initialization and session retention. A supported fix or reliable recovery path is needed without blanket auto-acceptance of dialogs.

    Sanitized diagnostic evidence can be supplied if needed.

  4. CesarMoreno-dev commented on Oct 17, 2026

    @CesarMoreno-dev

    Reproduction update — 17 October 2026: plain JavaScript alert dismissal still times out on Windows

    This issue is still reproducible in a synthetic page, independently of the business application in my 30 September comment. The current test also reproduces with a plain window.alert(), not only window.confirm().

    Submitted in-app feedback

    The in-app feedback form confirmed a successful submission on 17 October 2026.

    Feedback ID: 01a14943-6c09-7110-a340-7834e677de74

    Please correlate this feedback reference with the isolated JavaScript-alert reproduction and evidence below. The successful submission was confirmed by the application; the exact document/log attachment selections were not independently verified.

    Current environment

    • Prompts sent from the ChatGPT Android app through Remote to the connected Windows PC.
    • Desktop package: OpenAI.Codex 26.1013.4894.0.
    • Windows version reported by the registry: 26H2, build 26300.9711.
    • Google Chrome: 155.0.8059.84, controlled through the connected Chrome extension.
    • Test date: 17 October 2026; time zone: Europe/Madrid, UTC+02:00.
    • Exact Android/app and Chrome-extension versions were not collected.

    Isolated alert reproduction

    The local HTML fixture included below uses only synthetic text, has no certificate dependency and makes no external requests. It was served on http://127.0.0.1:8768/ using Python's HTTP server bound to loopback.

    1. Open the fixture in a new extension-controlled Chrome tab.
    2. Read its accessibility state successfully.
    3. Click the ordinary JavaScript control button. Read the visible result CONTROL: page JavaScript executed. successfully.
    4. Click the button whose handler calls alert('Synthetic JavaScript alert. No personal data.').
    5. The click reports that it was interrupted by the JavaScript alert. This is expected modal detection; the action is not repeated on that tab.
    6. tab.getJsDialog() returns a dialog with type: "alert".
    7. Call the supported dialog.dismiss() method.

    Actual result: the dismiss call itself fails with:

    Timed out after 10000ms waiting for CDP command Emulation.setFocusEmulationEnabled.
    

    The failure occurred in two fresh synthetic tabs. In the second attempt, dismiss() was called in its own tool invocation, without a subsequent DOM read, establishing that the exception comes from dismissal itself. The expected post-alert page result could not be verified.

    After the first failure, getJsDialog() returned no registered dialog, but closing that synthetic tab through the supported tab.close() API also timed out in the same focus-emulation command. An empty dialog cache therefore did not establish successful closure or healthy page control. A fresh fixture tab could still be created and read.

    Separate certificate-based workflow with related symptoms

    On the same date, an Importass certificate-login workflow failed in two independent remote conversations. Public-page and login-method reads worked, but after selecting DNIe o certificado, the tab reached:

    https://idp.seg-social.es/PGIS/Login?seleccion=IPCE
    

    Subsequent reads failed in DOMSnapshot.captureSnapshot; screenshot attempts failed in Emulation.setFocusEmulationEnabled. Tab inventory continued to respond in the second conversation. A possible native client-certificate selector could not be observed, so a shared cause with the JavaScript-alert failure is not established.

    Recovery observations

    The Windows desktop fallback stopped before it could show or operate the Chrome window:

    Computer Use has been stopped for this turn because it could not determine the current browser URL on Windows with enough confidence to enforce policy.
    

    Resetting the browser-control JavaScript session did not restore all existing-tab reads. A request to navigate to chrome://restart was rejected because the browser URL policy only allows HTTP and HTTPS. The browser was not restarted; this is a recovery limitation, not evidence of another implementation bug. No workaround to that rejection was attempted.

    Expected behavior / investigation request

    Please make the supported dialog API able to dismiss a known active JavaScript alert and restore page control. Please investigate focus/attachment initialization before dialog handling, dialog/session retention, and cache invalidation after a timeout. An empty dialog cache should not be treated as proof that the modal was handled successfully.

    The requested fix must retain existing URL, app-permission and security checks; blanket dialog auto-acceptance is not requested. The alert fixture was tested through the supported API, without replacing alert/confirm, changing installed runtimes or injecting a custom CDP client.

    A new remote conversation did not resolve the certificate workflow. A real Chrome restart, a Windows restart and a test after updating the installed application were not performed in this investigation. The desktop/Chrome versions above identify the tested installation, not a claim that it is the latest available build.

    The minimal fixture and sanitized step-by-step evidence are included below. No personal names, government identifiers, certificate identifiers, credentials, private URLs or complete session transcripts are included here.

    Minimal HTML fixture (save as index.html)

    Run python -m http.server 8768 --bind 127.0.0.1 from the directory containing this file, then open http://127.0.0.1:8768/ in a new extension-controlled Chrome tab.

    <!doctype html>
    <html lang="en">
    <meta charset="utf-8">
    <title>Browser dialog diagnostic fixture</title>
    <style>
      body { max-width: 800px; margin: 48px auto; padding: 0 24px; font: 18px/1.5 system-ui; color: #17212b; background: #f4f7fb; }
      button { padding: 12px 18px; margin: 6px 8px 6px 0; font: inherit; }
      #results { padding: 20px 20px 20px 40px; background: white; border: 1px solid #c5ccd5; min-height: 80px; }
    </style>
    <h1>Browser dialog diagnostic fixture</h1>
    <p>Local synthetic test. No personal data, certificate access, or external requests.</p>
    <p>
      <button id="control">Test page JavaScript</button>
      <button id="alert">Test JavaScript alert</button>
      <button id="confirm">Test JavaScript confirm</button>
      <button id="prompt">Test JavaScript prompt</button>
    </p>
    <h2>Observed results</h2>
    <ol id="results" aria-live="polite"><li>Page loaded.</li></ol>
    <script>
      const appendResult = text => {
        const item = document.createElement('li');
        item.textContent = text;
        document.getElementById('results').append(item);
      };
      document.getElementById('control').onclick = () => appendResult('CONTROL: page JavaScript executed.');
      document.getElementById('alert').onclick = () => {
        alert('Synthetic JavaScript alert. No personal data.');
        appendResult('ALERT: execution resumed after the dialog closed.');
      };
      document.getElementById('confirm').onclick = () => {
        const response = confirm('Synthetic JavaScript confirmation. No external action.');
        appendResult('CONFIRM: returned ' + String(response) + '.');
      };
      document.getElementById('prompt').onclick = () => {
        const response = prompt('Synthetic JavaScript prompt. Enter test text only.', '');
        appendResult('PROMPT: returned ' + JSON.stringify(response) + '.');
      };
    </script>
    </html>
    Sanitized step-by-step test evidence

    Isolated browser alert test — 17 October 2026

    Status: sanitized test evidence included with this reproduction update.

    Fixture and environment

    • Tested HTML: .diagnostics/browser-dialogs/index.html.
    • Local address: http://127.0.0.1:8768/.
    • Server: Python 3.12 http.server, bound to 127.0.0.1, serving only the fixture directory.
    • Connection: Android Remote to the Windows PC; Chrome extension backend.
    • Desktop package: OpenAI.Codex 26.1013.4894.0.
    • Chrome: 155.0.8059.84.
    • Windows registry version/build: 26H2, 26300.9711.

    Baseline control

    Creating the first fixture tab and reading its accessibility tree succeeded. Clicking Test page JavaScript produced this visible text in the next accessibility observation:

    CONTROL: page JavaScript executed.
    

    This establishes that the page's own JavaScript and normal click/read operations worked before the alert test.

    Alert attempt A

    1. Click Test JavaScript alert once, using its index from the current accessibility snapshot.

    2. The tool reported:

      Browser action "click" interrupted by JavaScript alert: Synthetic JavaScript alert. No personal data. The action may already have taken effect; do not retry it. Inspect or dismiss the dialog before continuing.
      
    3. getJsDialog() returned type: "alert".

    4. The next tool cell awaited dialog.dismiss() followed by a page-state read. It failed with:

      Timed out after 10000ms waiting for CDP command Emulation.setFocusEmulationEnabled.
      
    5. A subsequent getJsDialog() returned no registered dialog. Actual modal closure was not independently verified.

    6. An attempt to close this synthetic tab with tab.close() failed with the same focus-emulation timeout.

    The combined cell in step 4 alone did not distinguish dismissal failure from a later state-read failure. Attempt B below isolates that question.

    Alert attempt B — dismissal isolated

    1. Create another fresh fixture tab. Its accessibility tree loads successfully.

    2. Click Test JavaScript alert once. The same alert-interruption message appears.

    3. getJsDialog() again returns type: "alert".

    4. In a separate tool cell, run only:

      try {
        await isolatedAlert.dismiss();
        nodeRepl.write({ alertDismissReturned: true });
      } catch (error) {
        nodeRepl.write({ alertDismissReturned: false, error: String(error.message || error) });
      }
    5. Observed output:

      {
        "alertDismissReturned": false,
        "error": "Timed out after 10000ms waiting for CDP command Emulation.setFocusEmulationEnabled."
      }

    This establishes that the supported alert-dismiss operation itself fails in this environment. It does not establish whether Chrome eventually closed the physical dialog.

    Scope and limitations

    • The fixture requires no account, government service, certificate, upload or external data.
    • No real application confirmation or data mutation was performed by these tests.
    • confirm() and prompt() controls exist in the fixture but were not exercised in this current isolated run. Earlier confirm failures are separately documented in Windows Chrome dialog.accept() stalls in Emulation.setFocusEmulationEnabled after a save click opens a JavaScript confirm #43653.
    • There was no fresh-desktop-only comparison, real browser restart or Windows restart in this investigation.
    • The Importass failure reproduced in a second conversation, according to the supplied test record. The synthetic alert tests took place in the original conversation.
    • A common implementation cause between the alert and certificate-login symptoms remains unproven.
    • Synthetic tab cleanup through tab.close() failed for the first affected tab; closure of the affected test tabs is not claimed.
    • The temporary loopback-only HTTP server was stopped after the test. The test HTML remains available as an artifact for reproduction.

    The previously published report and the user's 30 September follow-up were verified live at #43653.

  5. fromraiderv-hash commented on Oct 29, 2026

    @fromraiderv-hash

    Controlled Windows comparison on 2026-10-29: handling a known synthetic dialog while its click is pending avoids the timeout in two independent chats.

    Environment: Korean Windows (ko-KR), MSIX 26.1023.6621.0; configured updater reports 26.1023.51421 / build 22530 / prod / up_to_date. Edge ChatGPT extension 1.26.1021.11019.

    On a loopback-only synthetic page with no external requests or private data:

    • Local CUA: accepting a confirm within the same tool invocation succeeded. Leaving a known confirm until the next invocation made dismiss() time out in Emulation.setFocusEmulationEnabled after 10000ms. Normal tab.close() also timed out. The diagnostic-only tab was removed through the documented browser management API.
    • Independent durable dot chat: awaiting Playwright.click() first timed out in Input.dispatchMouseEvent after about 3 seconds while the confirm was active.
    • Same dot, fresh diagnostic tab: start click Promise, detect and handle the known synthetic dialog before awaiting the click, then await click completion and read the visible result, all within one tool invocation. Confirm acceptance, cancellation, and confirm followed by a separate alert all passed. First dialog detection was approximately 80ms / 111ms. The temporary tab was closed and absence verified.
    • Local tests also passed a delayed confirm and a confirm-to-alert sequence. This is controlled synthetic coverage, not proof of a general production fix.

    Read-only inspection still shows attach -> enableFocusEmulation -> register attached tab -> attach handlers. Browser service SHA256: 0C1CB5B13BBE6AE70CEA751740E537885A12D53CD076C864CD9154EF6E86E3BB.

    Please investigate retaining the dialog-capable attachment across invocation boundaries and resolving a modal without first waiting on renderer focus initialization. URL/access checks must remain enforced; blanket dialog acceptance is not requested.

    No installed tooling, page alert/confirm functions, OS language or permissions were changed. No raw CDP client was used. Private chat IDs, paths, business content and raw logs are omitted.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbrowserbugtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions