6 Pitfalls: My Automation Chrome Killed the Chrome in My Dock (bundle id split + ad-hoc re-signing)
Description and use
Playwright’s direct Chrome execution interferes with macOS Chrome. The fix is to clone Chrome, give it a new bundle ID, re‑sign it, and patch node_modules, with a launchd job to keep patches up to date.
Problem
Playwright’s direct execution of Chrome interfered with the system’s Chrome, causing the Dock to think Chrome was running even when no GUI windows were open.
Outcome
The Dock no longer reports Chrome as running when only automation scripts are active, and the automation Chrome remains functional without interfering with the user’s normal Chrome experience.
Workflow
- Copy /Applications/Google Chrome.app to a new location as Chrome Automation.app
- Change CFBundleIdentifier to com.google.ChromeAutomation in Info.plist
- Ad‑hoc re‑sign the bundle with codesign --deep
- Patch node_modules/playwright-core to point to the automation binary
- Set up a launchd agent to re‑apply the patch every 6 hours
Evidence
Just rewriting CFBundleIdentifier to com.google.ChromeAutomation is enough for LaunchServices to register it as an app distinct from regular Chrome
Re‑signing the whole bundle ad‑hoc with --deep restores internal consistency
- Record date: 2026-09-14T19:15:59.261Z