Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

4 Automation Chrome Processes Were Killing My Real Browser: Bundle-ID Isolation and a 6-Hour Self-Repair Loop

Description and use

Separating the automation Chrome into a distinct bundle ID eliminates resource contention, allowing the user to open a normal Chrome window while automation jobs continue to run. A periodic repair script keeps the automation bundle in sync with Chrome updates.

Problem

Multiple automation jobs launching Chrome with the same bundle ID caused the system to treat them as a single instance, preventing the user from opening a normal Chrome window and leading to a 6‑hour self‑repair loop.

Outcome

Separating the automation Chrome instance into a distinct bundle ID eliminates resource contention, allowing the user to launch Chrome normally while automation jobs continue to run. The periodic repair script keeps the automation bundle in sync with Chrome updates.

Workflow

  • 1. Detect that Chrome Automation.app is missing or out of sync with Google Chrome.app.
  • 2. Copy Google Chrome.app to Chrome Automation.app if needed.
  • 3. Modify Info.plist to set CFBundleIdentifier to com.google.ChromeAutomation and CFBundleName to "Chrome Automation".
  • 4. Ad‑hoc code‑sign the new bundle to satisfy macOS launch requirements.
  • 5. Search all project node_modules for playwright-core/lib/coreBundle.js files.
  • 6. Replace the hard‑coded path to Google Chrome.app with the path to Chrome Automation.app in each file.
  • 7. Log the patching activity and exit with error if no files were patched to avoid silent failures.
  • 8. Schedule this repair script to run every 6 hours via launchd.
  • 9. Ensure the script runs at load to catch any immediate drift.
  • 10. Verify that Playwright launches the automation Chrome instance while the user can open a separate Chrome window normally.

Evidence

macOS LaunchServices treats apps with the same CFBundleIdentifier as a single instance of the same app.

Source

Create a separate bundle named /Applications/Chrome Automation.app and change its bundle ID to com.google.ChromeAutomation.

Source

The 6‑hour self‑repair script exists to re‑apply the patch after npm install or Chrome updates.

Source

  • Record date: 2026-09-21T19:30:14.382Z