jcrabapple/hermes-skills/browser-tool-failures

Claude Code and agent skill by jcrabapple/hermes-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Diagnose and fix browser_navigate / browser_snapshot / browser_click failures in Hermes Agent on Aurora Linux. Use when browser tools fail with "Chrome exited early", "Auto-launch failed", "DevTools URL" errors, "app/com.google.Chrome/x86_64/master not installed", "local browser could not be started", or return empty content. Covers Camofox routing, Flatpak Chrome (session-bus + TMPDIR handshake requirements), and the cicada toolbox Chromium fallback.

Install

npx vskill@latest install jcrabapple/hermes-skills/browser-tool-failures

SKILL.md

The same SKILL.md was published earlier as jcrabapple/hermes-skills/browser-tool-failures.

Browser Tool Failures on Aurora

Quick diagnosis (run in order)

  1. Test the local Chrome shim:

``bash google-chrome --version 2>&1 ` If you see error: app/com.google.Chrome/x86_64/master not installed, the Flatpak shim at ~/.local/bin/google-chrome is broken (the Chrome Flatpak ref isn't installed even though flatpak` itself is).

  1. Test Camofox (preferred path):

``bash curl -s -w "%{http_code}\n" -o /dev/null --max-time 3 http://localhost:9377/health ` Should return 200. Server runs as camofox-browser.service (systemd user unit) on **port 9377**, not 9382. Health endpoint at /health, tabs at /tabs`.

  1. Test Chromium in cicada toolbox (cron jobs run here):

``bash toolbox run --container cicada /usr/bin/chromium-browser --version ` Should return something like Chromium 148.0.7778.96 Built from source for Fedora release 42 (Adams)`.

  1. Check the active browser routing:

``bash grep -E "CAMOFOX_URL|AGENT_BROWSER_EXECUTABLE_PATH" ~/.hermes/.env ` The browser tool checks in this order (browser_tool.py:3603+`):

  1. AGENT_BROWSER_EXECUTABLE_PATH env var — explicit binary override
  2. CAMOFOX_URL env var — routes through Camofox REST API
  3. shutil.which("google-chrome") then chromium then chromium-browser then chrome — local binary

Common causes and fixes

Symptom: "Auto-launch failed: Chrome exited early... app/com.google.Chrome/x86_64/master not installed"

Cause: The shim at ~/.local/bin/google-chrome is a 2-line bash script (exec flatpak run com.google.Chrome "$@"). It needs the Chrome Flatpak installed. Without it, the shim silently fails.

Fix options (in order of preference):

  • Switch to Camofox (preferred — no Chrome needed):

`` # Add to ~/.hermes/.env CAMOFOX_URL=http://localhost:9377 `` Restart session to take effect (.env is read at session start, not per-turn).

  • Install Chrome Flatpak (the original intent of the shim):

``bash flatpak install flathub com.google.Chrome `` ~1GB download. Takes effect immediately.

  • Point at the shim explicitly: AGENT_BROWSER_EXECUTABLE_PATH=~.local/bin/google-chrome — the robust shim resolves Flatpak Chrome on the host and system Chromium inside cicada toolboxes. Set in ~/.hermes/.env (read at session start — a gateway/session restart applies it).
Symptom: browser_exec / agent-browser launches time out ("The local browser could not be started: Command timed out after 120 seconds"), orphaned agent-browser-chrome- trees pile up (THIRD failure mode, post-Chrome-154)

Diagnose in order — two independent causes, both must hold:

  1. Chrome dies at startup without a session D-Bus. Flatpak Chrome 154+ spawns a settings helper ("cobalt") that hard-requires the D-Bus settings portal even when --headless=new. Headless launches from cron/daemons (no DISPLAY, no bus) exit rc=1 instantly with Settings portal not found: Cannot autolaunch D-Bus without X11 $DISPLAY. agent-browser then waits forever on a DevToolsActivePort handshake that never comes → 120s timeout. Fix (applied 2026-09-27): ~/.local/bin/google-chrome shim exports DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus when unset. Verify without Hermes:

``bash env -u DBUS_SESSION_BUS_ADDRESS ~/.local/bin/google-chrome --headless=new --user-data-dir=/tmp/x about:blank --dump-dom # must print <html>, not the D-Bus error ` Any OTHER launch path that spawns flatpak run com.google.Chrome directly (e.g. ~/.hermes/scripts/ensure_chrome_debug.py`) must inject the same env var itself — it bypasses the shim.

  1. The handshake file is invisible across the sandbox boundary. agent-browser creates its throwaway profile under $TMPDIR. Hermes sets TMPDIR to ~/.hermes/cache/scratch, and the Flatpak sandbox had no grant for that path, so Chrome wrote DevToolsActivePort into a mount namespace the host could not read — same class of failure as the old private-/tmp bug, new path. Fix (applied 2026-09-27): flatpak override --user --filesystem=/var~.hermes/cache/scratch com.google.Chrome. Verify:

``bash AB=$(ls ~.npm/_npx/*/node_modules/.bin/agent-browser | head -1) env -u DBUS_SESSION_BUS_ADDRESS timeout 40 "$AB" --session smoketest --json open http://127.0.0.1:8499/ # JSON success <40s = healthy "$AB" --session smoketest close ``

Orphan cleanup: every timed-out launch leaks a full Chrome tree (651 were killed 2026-09-27; the pile itself starves later launches). Kill only agent-browser-chrome- trees with the python snippet below — never blanket-kill chrome; Jason's real Chrome (possibly squatting :9222 via the chrome://inspect toggle, see next section) must survive:

bash
python3 -c "import subprocess,os,signal; out=subprocess.run(['ps','-eo','pid,args'],capture_output=True,text=True).stdout; [os.kill(int(l.split()[0]),signal.SIGKILL) for l in out.splitlines() if 'agent-browser-chrome-' in l and 'ps -eo' not in l]"
Symptom: a port-9222 listener that is NOT a working CDP endpoint (the chrome://inspect toggle)

The chrome://inspect → Allow remote debugging toggle in Jason's interactive Chrome sets devtools.remote_debugging.user-enabled: true in Local State and makes that Chrome listen on 9222 without a usable endpoint: /json/version and /json/* return 404, a websocket upgrade with an Origin header gets 403 ("Use --remote-allow-origins"), and without an Origin header it hangs on the modal "Allow remote debugging?" consent dialog. An open TCP port proves nothing — readiness MUST be GET /json/version returning 200 with a Browser field (Hermes' own is_browser_debug_ready in hermes_cli/browser_connect.py does exactly this). ~/.hermes/scripts/ensure_chrome_debug.py was hardened to that check on 2026-09-27; when 9222 is squatted it launches the dedicated profile on an ephemeral port discovered via DevToolsActivePort.

Also: the Flatpak Chrome sandbox has NO ~/.config access, so --user-data-dir=$HOME/.config/google-chrome silently never materializes — dedicated profiles must live under ~/.var/app/com.google.Chrome/config/.

Symptom: browser_exec — "Failed to launch Chrome at /usr/bin/chromium-browser: No such file or directory"

Cause: that path exists only inside the cicada toolbox. The browser-use/agent-browser path reads AGENT_BROWSER_EXECUTABLE_PATH directly and hard-fails on the host — unlike the built-in tools it does NOT fall through to which(). The legacy env value /usr/bin/chromium-browser broke every host-side browser_exec call.

Fix (applied 2026-09-09): ~/.local/bin/google-chrome is now a robust shim (Flatpak Chrome on the host → /usr/bin/chromium-browser fallback in toolboxes; ~/.local/bin/chromium-browser symlinks to it) and the env var points at it. Verify the shim in both environments without restarting anything:

bash
~/.local/bin/google-chrome --version # host → Google Chrome 152
~/.local/bin/google-chrome --version && toolbox run --container cicada ~.local/bin/google-chrome --version # toolbox → Chromium 148
Symptom: browser_exec launches TIMEOUT at 120s, orphaned chrome piles up (SECOND failure mode, same root region)

Once the env path was valid, launches still hung: browser 'get' timed out after 120s and ~6 orphaned --user-data-dir=/tmp/agent-browser-chrome-<uuid> chrome trees accumulated. Root cause: Flatpak Chrome runs with a PRIVATE /tmp. It writes DevToolsActivePort to /run/user/1000/.flatpak/com.google.Chrome/tmp/agent-browser-chrome-<uuid>/, while host-side agent-browser polls the host /tmp/agent-browser-chrome-<uuid>/ — the handshake file is never visible, so every launch times out and (older agent-browser versions) leak the chrome process.

Fix: flatpak override --user --filesystem=/tmp com.google.Chrome — host /tmp is then shared into the sandbox and the handshake lands where agent-browser looks. Persistent (survives reboots); revert with --nofilesystem=/tmp.

Verify without Hermes (agent-browser CLI lives in the npx cache):

bash
AB=~.npm/_npx/*/node_modules/.bin/agent-browser
node $AB --session smoketest --json open http://127.0.0.1:8499/ # JSON <1s = healthy; silence = broken handshake
node $AB --session smoketest close

Clean up orphaned chrome (only agent-browser-chrome- trees — never blanket-kill chrome; the ~/.config/google-chrome one on :9222 is Jason's real-profile connect browser):

bash
python3 -c "import subprocess,os,signal; out=subprocess.run(['ps','-eo','pid,args'],capture_output=True,text=True).stdout; [os.kill(int(l.split()[0]),signal.SIGKILL) for l in out.splitlines() if 'agent-browser-chrome-' in l and 'ps -eo' not in l]"

Note: pkill -f self-matches — if the pattern string appears anywhere else in your command line, pkill kills YOUR shell too (hit live). Use the python form above.

Symptom: Browser works in interactive TUI but cron jobs fail

Cause: Cron jobs run inside the cicada toolbox. The broken google-chrome shim is bind-mounted from the host and fails in the toolbox too. Camofox server (port 9377) IS reachable from inside the toolbox via localhost.

Fix: Make sure CAMOFOX_URL=http://localhost:9377 is in ~/.hermes/.env (the bind-mounted file is the same in both envs). Verify with:

bash
toolbox run --container cicada curl -s -o /dev/null -w "%{http_code}\n" http://localhost:9377/health
Symptom: "userId and sessionKey required" (testing Camofox directly with curl)

Cause: Camofox requires both fields in the POST body when opening a tab. The browser tool auto-generates them — see browser_camofox.py:328 for the format.

Fix for manual testing: Mimic the auto-generation:

bash
USER_ID="hermes_$(python3 -c 'import uuid; print(uuid.uuid4().hex[:10])')"
SESSION_KEY="task_smoketest_$(date +%s)"
curl -X POST "http://localhost:9377/tabs" \
-H "Content-Type: application/json" \
-d "{\"userId\":\"$USER_ID\",\"sessionKey\":\"$SESSION_KEY\",\"url\":\"https://example.com\"}"
Symptom: Navigation returns HTTP 500 "Version information not found at ~.cache/camoufox/version.json"

Cause: The Camoufox browser binary was never downloaded. The Node camoufox-js server reads ~/.cache/camoufox/version.json to know the installed browser version; when that file is absent, every tab launch fails with 500. The health endpoint shows {"ok":true,"browserConnected":false,"browserRunning":false} and the server log repeats FileNotFoundError: Version information not found... Please run camoufox fetch to install.

Diagnosis:

bash
curl -s http://localhost:9377/health # browserConnected:false, browserRunning:false
ls ~/.cache/camoufox/version.json # missing

Fix (use the Node CLI, NOT the Python `camoufox` CLI):

bash
cd ~camofox-browser
node node_modules/.bin/camoufox-js fetch # downloads the browser + writes version.json
systemctl --user restart camofox-browser.service
curl -s http://localhost:9377/health # should show browserRunning:true

Why the Python CLI doesn't fix it: The camoufox Python package (~/.local/bin/camoufox, v0.5.4) uses a different install marker (.0.5_FLAG + config.json) than the Node camoufox-js server (v0.8.x, which reads version.json). They share ~/.cache/camoufox/ but have incompatible versioning schemes. The error's suggestion to run "camoufox fetch" refers to the Node package's own fetch, not the Python binary. Always run the fetch from inside ~camofox-browser via node node_modules/.bin/camoufox-js fetch.

Camofox cannot execute JavaScript

Symptom: SvelteKit/React/Vue app loads but stays on the SSR-rendered loading screen. browser_snapshot shows minimal content. No console errors visible.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/jcrabapple/hermes-skills/browser-tool-failures/badge)](https://verified-skill.com/skills/jcrabapple/hermes-skills/browser-tool-failures)

Something wrong with this skill or its page? Tell us.