Skip to content

Orphaned --browser chrome processes block normal Chrome on macOS #388

@neonwatty

Description

@neonwatty

Problem

When a daemon using --browser chrome (channel: "chrome") dies ungracefully, the Chrome process it spawned becomes orphaned (PPID=1). On macOS this blocks the user from opening Chrome normally — Launch Services routes clicks to the orphaned headless instance.

kill-all doesn't help: it only matches daemon process patterns (cliDaemon.js, etc.), not the browser processes they spawned.

This was reported in #312 (confirmed orphans survive kill -9) and #360 (process accumulation). Both closed without a fix in the CLI.

What happened

A persistent --browser chrome session in ~/Library/Caches/ms-playwright/daemon/ left an orphaned Chrome process after the daemon exited. The session config:

{
  "browserName": "chromium",
  "launchOptions": {
    "headless": false,
    "channel": "chrome"
  },
  "userDataDir": "...ud-supabase-setup-chrome"
}

The orphaned Chrome (PPID=1) held the Launch Services registration, so open -a "Google Chrome" did nothing visible. Manually killing it restored normal Chrome.

Suggestion

kill-all should also find and kill orphaned browser processes — e.g., by storing the browser PID in the .session file, or by matching Google Chrome.*remote-debugging-port patterns alongside daemon patterns.

Environment

  • @playwright/cli 0.1.8, playwright-core 1.60.0-alpha
  • macOS 15.5 (Darwin 25.4.0)

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