Document mac-7 Chrome LaunchAgent fix

This commit is contained in:
hotwa
2026-03-18 15:12:23 +08:00
parent 6e0cf87be2
commit afa9ebde67
2 changed files with 56 additions and 1 deletions

View File

@@ -78,4 +78,30 @@ So future tasks should treat the endpoints as:
- For mac-5 intelligent browser takeover: use OpenClaw local `user` profile.
- For mac-7 automation on the same machine: use CDP on `127.0.0.1:9333`.
- For mac-5 controlling mac-7 across the tailnet, do not assume `100.64.0.23:9223` is durable unless a persistent proxy/serve configuration is explicitly installed later.
- For mac-5 controlling mac-7 across the tailnet: use the stable remote CDP endpoint `http://100.64.0.23:9223`.
## LaunchAgent correction after blank-tab loop incident
Validated on 2026-03-18 later the same day:
- The original `com.lingyuzeng.chrome-cdp-mac7` LaunchAgent caused repeated blank tabs.
- Root cause: the plist directly executed Chrome with `KeepAlive=true` and `about:blank` in `ProgramArguments`.
- On macOS, Chrome detected the existing browser session, printed `正在现有的浏览器会话中打开。`, exited with code `0`, and launchd immediately re-ran it.
- This created a loop that kept injecting new `about:blank` tabs into the same automation profile.
### Corrected durable implementation
- LaunchAgent remains:
- `~/Library/LaunchAgents/com.lingyuzeng.chrome-cdp-mac7.plist`
- It should no longer use `KeepAlive=true` to re-exec Chrome directly.
- It should launch a wrapper script instead:
- `~/.openclaw/bin/start_chrome_cdp_mac7.sh`
- Wrapper behavior:
- check whether `127.0.0.1:9333` is already listening
- if yes, exit without launching another Chrome instance
- if no, start the dedicated automation Chrome profile once
### Operational takeaway
- If future symptoms show many new `about:blank` tabs appearing on mac-7, first inspect `com.lingyuzeng.chrome-cdp-mac7.plist` for accidental reintroduction of `KeepAlive` or direct Chrome execution with `about:blank`.
- The repeated-tab issue was caused by LaunchAgent semantics, not by the remote CDP profile on mac-5.