Skip to content

sync alert deadlocks WebDriver session #809

Description

@XDLCS

Steps to reproduce

  1. Serve a page that calls alert() synchronously during load:
<!DOCTYPE html>
<html>
<body>
  <script>alert("sync-during-load");</script>
  <div id="after">after-alert-content</div>
</body>
</html>
  1. Create a WebDriver session against moli serve, then:
POST /session/{id}/url   -> alert page   (hangs 20s+, no response)
GET  /session/{id}/title                -> timeout
DELETE /session/{id}                    -> timeout, session unrecoverable

Expected

The session stays alive. The dialog is auto-dismissed or queued, and every command (including session teardown) still responds.

Actual

Every subsequent command — including DELETE /session — times out. The session cannot be recovered.

Control: the same command sequence against a page without alert() completes in <0.1 s per command.

The CDP path handles the same page correctly: Page.javascriptDialogOpening fires, Page.handleJavaScriptDialog works, and the page continues loading. The defect is specific to the WebDriver command pipeline.

Environment

  • moli 1.1.10 (9b2f86b), Linux, WebDriver Classic endpoint
  • Deterministic since 1.1.7

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions