/hearth:hearth-debug-sessionfrom TestZeus Hearth
Investigates failed or stuck Hearth test sessions by finding sessions, reading gateway errors, downloading video and device logs, taking live screenshots, and mapping errors to fixes.
Ships in TestZeus Hearth. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Every refusal and every early end has a short code and a plain message. Find it first; it
usually names the fix.
Docs: https://test-zeus-ai.github.io/testzeus-hearth/guide/troubleshooting/ and https://test-zeus-ai.github.io/testzeus-hearth/guide/api/
echo "HEARTH_URL=${HEARTH_URL:-unset} HEARTH_KEY=${HEARTH_KEY:+set}"
H="Authorization: Bearer $HEARTH_KEY"
Never print the key. If the Hearth MCP server is registered (hearth mcp), its tools do the same
reads as the calls below; use whichever is available.
Errors before a session exists come back to the client, not into the session list:
connect holds the message (HTTP status before the
WebSocket upgrade).session not created with the message in value.message.If the test output has one of those, go to the table in step 5. Otherwise find the session.
hearth sessions # the team's recent sessions
curl -fsS -H "$H" "$HEARTH_URL/api/sessions?state=failed&limit=20"
curl -fsS -H "$H" "$HEARTH_URL/api/sessions?state=running"
States: queued, running, finishing, done, failed. Match by time (createdMs,
milliseconds since the epoch), pool, protocol and client (the client's User-Agent).
Session records are kept 7 days. Another team's sessions answer 404; use the right team's key.
One session:
curl -fsS -H "$H" "$HEARTH_URL/api/sessions/<id>"
Read state, error, pool, pod (the device id for device sessions), startedMs, endedMs
and artifacts.
mkdir -p hearth-artifacts/<id>
curl -fsS -H "$H" -o hearth-artifacts/<id>/video.mp4 "$HEARTH_URL/api/sessions/<id>/artifacts/video.mp4"
curl -fsS -H "$H" -o hearth-artifacts/<id>/device.log "$HEARTH_URL/api/sessions/<id>/artifacts/device.log" # devices only
artifacts exist. Headless browser sessions have no video. Device
artifacts appear a little after the session ends.ffmpeg -sseof -3 -i video.mp4 -vf fps=1 hearth-artifacts/<id>/end-%02d.png, then read the
images.$HEARTH_URL/sessions/<id> (hearth open <id> opens it)..gitignore if needed).curl -fsS -H "$H" -o now.jpg "$HEARTH_URL/api/sessions/<id>/live?frame=1" # one JPEG of the screen
Read the image to see the screen. 409 not_running means it already ended; 502 no_stream
means the pod or agent serves no stream (headless browsers show nothing).
Stop a session only if the user agrees (it ends as failed with stopped by a user):
hearth stop <id> # or: curl -fsS -X DELETE -H "$H" "$HEARTH_URL/api/sessions/<id>"
hearth status # READY, BUSY, QUEUED, MAX per pool; your team's running count
curl -fsS -H "$H" "$HEARTH_URL/api/me"
hearth doctor # checks setup and connectivity end to end
With cluster access:
kubectl -n hearth get pods,browserpools,devicepools
kubectl -n hearth logs deploy/hearth-gateway --tail=200 | grep <session id>
kubectl -n hearth logs deploy/hearth-operator --tail=200
kubectl -n hearth get events --sort-by=.lastTimestamp | tail -30
| Code / message | Cause | Fix |
|---|---|---|
428 no_pool this farm runs Playwright 1.65 for chromium, not 1.60 | Client major.minor has no pool | Pin the client to the farm's version, or add a pool for it |
428/404 no_pool this farm has no webkit pool for playwright | No pool for that engine and protocol | Add one under pools: in the chart values |
no pool named "x" serves chromium over playwright | ?pool= or hearth:options.pool is wrong | Check names with kubectl -n hearth get browserpools |
404 unknown_engine | Path is not `/playwright/chromium | firefox |
400 engine_mismatch | firefox.connect on a /playwright/chromium URL | Use the engine's own URL |
404 no_cdp | CDP on Firefox or WebKit | CDP is /cdp/chromium only |
400 not_websocket | Plain HTTP to a WebSocket URL, or a proxy strips Upgrade | Let the ingress pass WebSockets |
400 this farm has no "safari" browser | Selenium browserName other than chrome/firefox | Use chrome or firefox |
401 bad_key | Wrong, deleted, or very new key (published every 3 s) | Check with GET /api/me; Secret needs label hearth.testzeus.com/team |
401 missing_key | No key reached the gateway | Send Authorization: Bearer, basic auth, or ?token=; check proxies |
429 team_limit (Retry-After: 10) | Team at its maxSessions (queued count too) | Fewer workers, raise the limit, quit() forgotten Selenium sessions |
429 pool_busy no chromium became free within 120s | Pool full for the whole queue timeout | Raise pool maxSessions; check Pending pods (no nodes); raise warm; raise queueTimeoutSeconds |
502 pod_unreachable | Claimed pod died or a NetworkPolicy blocks the gateway | Retry; custom gateways need the gateway component label |
403 cross_origin | Cookie-authenticated write from another origin | Use an API key header in scripts |
409 not_running | Live view, control or stop on an ended session | Nothing to do |
400 app_not_uploaded | appium:app is a URL or path | hearth app upload <file> and pass hearth:app:<sha256> |
404 app_not_found | Mistyped ref, or another team's app | Upload with this team's key |
400 bad_app_name | x-filename not .apk, .zip, .app.zip | Rename; .ipa is refused |
503 no_storage | No bucket configured | Configure storage (Artifacts guide) |
404 no_pool this farm has no android devices | No DevicePool matches platform, name, version | kubectl -n hearth get devicepools; loosen appium:deviceName / platformVersion |
429 pool_busy no android became free within 300s | Devices busy or not heart-beating | Check agents (hearth status READY) |
502 agent_unreachable | Gateway cannot reach the agent's agent_url | Fix agent networking |
500 prepare_failed | App install or recording failed on the device | Read the agent's log; check the app suits the device |
500 appium_refused | Appium rejected the capabilities | Read Appium's message in the error |
403 unsupported operation | Install/push/pull or a blocked mobile: command | Upload apps through the farm; avoid host commands |
Session error values (the session started, then ended early):
error | Fix |
|---|---|
max duration reached | Raise the pool's maxSessionSeconds, or split the run |
ended after no command for too long | Selenium/Appium idle 5 minutes (devices: idleTimeoutSeconds); quit() when done |
stopped by a user | Someone pressed Stop or called DELETE /api/sessions/{id} |
the client never connected | Client went away after a pod was claimed, usually a client timeout while queued |
never got a browser | Queue timed out or the client gave up; make the client's connect timeout longer than the queue timeout |
the device restarted during the session | The agent restarted; check the device host |
the browser or device went away during the session | Pod deleted, evicted or node lost; kubectl get events |
the request was abandoned while waiting | Its gateway died while queued; retry |
If the error is not here, read https://test-zeus-ai.github.io/testzeus-hearth/guide/troubleshooting/ in full.
Tell the user: the session id, its error (or the refusal message), what the video or screenshot
shows at the failure, the likely cause, and the fix. Ask before changing farm settings, chart
values or the project's dependencies.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
hearth, test-farm, session-debugging, device-logs, video-artifacts
npx claudepluginhub test-zeus-ai/testzeus-hearth --plugin hearth4 skills in this plugin
/hearth-connect-testsPoint an existing Playwright, Selenium or Appium test suite at a Hearth farm - environment variables, Playwright version matching, connect code for Node, Python, Java and .NET, and CI setup for GitHub Actions and GitLab CI. Use when the user wants their tests to run on Hearth, sees a version mismatch (`428 no_pool`), or wants Hearth in CI./hearth-devicesAdd Android emulators and iOS simulators to a TestZeus Hearth farm and run Appium tests on them - add a Mac with `hearth hosts add` and one pasted join line, choose its simulators with `hearth hosts plan`, drain, remove and reconnect hosts, in-cluster Android emulator pods, app upload by hash, and the Appium capabilities the farm accepts. Use when the user wants mobile or device testing on Hearth, wants more iOS capacity, a host is offline or unreachable, a device pool shows no READY devices, or an Appium session is refused./hearth-setupInstall the Hearth CLI and bring up a Hearth browser and device farm (local kind cluster, AWS or GCP, or an existing Kubernetes cluster with Helm), get an API key into the environment without exposing it, and verify the farm with `hearth status`. Use when the user wants to set up, install, start, upgrade or tear down Hearth, or when `hearth` is not installed yet.Other plugins' skills for the same job