.claude/skills/openclaw-browser-cdp-crash/SKILL.md
Fix OpenClaw browser service "Failed to start Chrome CDP on port 18800" error. Use when: (1) OpenClaw agent can't use browser tool, (2) gateway logs show "Failed to start Chrome CDP on port 18800 for profile openclaw", (3) browser crashes with Trace/BPT trap or SIGTRAP, (4) Chrome exits within 1-2 seconds of starting. Covers stale SingletonLock files, corrupted profiles with encrypted Keychain tokens, and orphaned Chrome processes.
npx skillsauth add Dbochman/dotfiles openclaw-browser-cdp-crashInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
OpenClaw's browser service fails to start Chrome with CDP (Chrome DevTools Protocol) on port 18800, preventing the agent from using browser-based skills (Amazon shopping, etc).
Failed to start Chrome CDP on port 18800 for profile "openclaw"Can't reach the OpenClaw browser control serviceOpenClaw uses system Google Chrome (/Applications/Google Chrome.app) in --headless=new mode — NOT Playwright Chromium. The Playwright Chromium at ~/Library/Caches/ms-playwright/chromium-1208/ is a separate binary.
The browser launch sequence (in chrome-BNSd7Bie.js):
ensurePortAvailable(18800) — verify port is freeresolveBrowserExecutable() — finds system Chrome (NOT Playwright)~/.openclaw/browser/openclaw/user-data/ensureProfileCleanExit() — patches Default/Preferences but does NOT remove Singleton files--remote-debugging-port=18800 --headless=new --password-store=basichttp://127.0.0.1:18800/json/version every 200ms for 15 secondsWhen the gateway gets SIGTERM'd by launchd, Chrome may not be cleanly killed. The lock files persist and prevent a new Chrome from using the same profile directory.
Diagnosis: Check for ~/.openclaw/browser/openclaw/user-data/SingletonLock — the PID in the lock file is not running.
Fix:
rm -f ~/.openclaw/browser/openclaw/user-data/SingletonLock
rm -f ~/.openclaw/browser/openclaw/user-data/SingletonCookie
rm -f ~/.openclaw/browser/openclaw/user-data/SingletonSocket
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway
When Chrome runs in a visible GUI session (e.g., during Amazon re-auth) and the user signs into Google or an encrypted token gets stored, those tokens are encrypted with the macOS Keychain. The headless gateway can't access the Keychain (especially over SSH where errKCInteractionNotAllowed occurs). Chrome crashes fatally when it can't decrypt these tokens.
Diagnosis: Run Chrome manually with the profile:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--headless=new --remote-debugging-port=18802 \
--user-data-dir=/Users/dbochman/.openclaw/browser/openclaw/user-data \
--no-first-run --password-store=basic about:blank 2>&1
If you see Failed to decrypt token for service AccountId-* followed by Trace/BPT trap, this is the cause.
Fix: Replace the corrupted profile:
launchctl bootout gui/$(id -u)/ai.openclaw.gateway
pkill -f "Google Chrome"
mv ~/.openclaw/browser/openclaw/user-data ~/.openclaw/browser/openclaw/user-data.broken
mkdir -p ~/.openclaw/browser/openclaw/user-data
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Prevention: When doing visible browser re-auth, do NOT sign into Google accounts — only sign into the target site (Amazon, etc).
A previous Chrome instance is still running and occupying the CDP port.
Diagnosis: lsof -i :18800
Fix: kill <PID> then restart gateway.
After applying any fix:
# Wait for gateway to start
sleep 5
# Check browser service is ready
tail -5 ~/.openclaw/logs/gateway.log | grep "Browser control"
# Test Chrome can start (optional direct test)
curl -s http://127.0.0.1:18800/json/version
ensureProfileCleanExit only patches Preferences — it's an OpenClaw bug that it doesn't clean Singleton files/Applications/Google Chrome.app — Playwright Chromium (Google Chrome for Testing) has a different cookie encryption key, so cookies set in Playwright are unreadable by system Chrome. Always re-auth with: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --user-data-dir=~/.openclaw/browser/openclaw/user-data --password-store=basictools
Use exact configured Reolink cameras through the local Home Hub for availability and power status, fresh stills, visual commentary, protected Dylan/Julia/household sharing, and reversible spotlight control. Supports trusted owner tasks and explicitly scoped proactive automations; not for Nest or Ring cameras, arbitrary recipients, recordings, account changes, or raw camera APIs.
data-ai
Privately manage Dylan and Julia's household plant inventory and care history by physical location, bed, and exact Flower Cam view. Use for confirmed plant onboarding from camera conversations, camera- or bed-filtered inventory, record corrections, individual or whole-bed care, and private filtered exports. Pair with reolink-camera when an owner asks about plants visible in Flower Cam images.
testing
Inspect and control the physically secured Reachy Mini at Crosstown through ClawBody. Use for requests to check Reachy, look around, express an emotion, play any official emotion or dance preset, speak proactively, mute or unmute its microphone, stop movement, or describe what its camera sees.
tools
Handle Reachy/iMessage handoffs, selective durable memory, forgetting, and diagnostics; automatic context comes from the gateway plugin.