Skip to content

[Feature]: cdpSession does not have a timeout waiting mechanism. #1810

Open

Description

@OnePunch1

🚀 Feature Request

Image
It don't rely on Supplier as a termination condition . Instead, it relies on WaitableResult - internally registering events through sendMessageAsync() via a callback mechanism.But if the browser never returns a message ⇒ waitable.isDone() is always false ⇒ while never exits ⇒ the thread hangs. So can PlayWright add a wait timeout mechanism?

Example

No response

Motivation

When multiple threads are tested, some threads may hang and not execute tasks.

Activity

  1. yury-s commented on Oct 19, 2026

    @yury-s
    Member

    Hi, the Playwright bot looked into this on my behalf.

    This is being added: CDPSession.send gets a timeout option in Playwright 1.65 (microsoft/playwright#43404). It defaults to 0, meaning no timeout, and throws TimeoutError when the browser doesn't answer in time. Java picks it up with the 1.65 driver roll. Until then CDPSession.send waits for the response indefinitely, as you describe.

    Separately, #2006 (merged after 1.63) makes calls that take a timeout throw TimeoutError on the client even when the driver process itself stops responding.

    Investigated locally by the Playwright bot

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions