Skip to content

[Bug]: Test runner hangs indefinitely on browser.close() in macOS when using channel: 'chrome' due to inherited stdio pipes #39736

@Tigran01

Description

@Tigran01

Version

1.58.2

Steps to reproduce

Steps to Reproduce:

  1. Be on a macOS device with standard Google Chrome installed.
  2. Be on the latest Google Chrome version
  3. Configure playwright.config.ts to use channel: 'chrome'.
  4. Run a standard test suite.
  5. Observe that after the tests finish executing, the terminal output stops. The parent process and test workers hang indefinitely instead of generating the report and exiting.

Expected behavior

The Playwright test runner should successfully resolve browser.close(), generate reports, and exit gracefully—even if macOS Chrome spawned background utility processes. Playwright should likely force-terminate or ignore the stdio pipes after the main spawned process PID actually exits, rather than w

Actual behavior

The worker process hangs waiting for the background GoogleSoftwareUpdate and chrome_crashpad_handler to end, keeping the test run from ever finishing.

Additional context

We debugged the hanging worker child processes and discovered that the Playwright Node.js worker event loop gets firmly parked in uv__io_poll.

  1. When Playwright launches the system Chrome on Mac (channel: 'chrome'), Chrome automatically spawns detached background utility processes: GoogleSoftwareUpdate and chrome_crashpad_handler.

  2. These detached background processes inherit the stdout/stderr file descriptors (UNIX pipes) that Playwright natively uses to monitor the browser.

  3. During test teardown, Playwright sends the Browser.close command via CDP, and the main Chrome process successfully shuts down (no Chrome renderer/browser processes remain).

  4. However, the background update and crashpad processes continue to run gracefully in the background, keeping the write ends of the stdio pipes open.

  5. Because the pipes never close, Node.js's child_process.spawn() never emits the 'close' event. Playwright's worker waits indefinitely for EOF on these pipes, deadlocking the teardown sequence.

Environment

Playwright Version: 1.58.2
Chrome Version: 145.0.7632.160
Operating System: macOS 15.5
Node.js Version: v25
Browser: System Google Chrome (channel: 'chrome')

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