Skip to content

Troubleshooting

Every refusal from the gateway has a status, a short code and a message meant for people:

{"error": {"code": "pool_busy", "message": "no chromium became free within 120s (you were number 7 in line)"}}

Selenium and Appium clients get the same message in W3C form ({"value": {"error": "session not created", "message": "..."}}) and raise it as an exception. Playwright clients show the message in the error thrown by connect.

Find your message below.

Connecting

this farm runs Playwright 1.65 for chromium, not 1.60; use a matching client version

428 no_pool. Your Playwright client's major.minor has no pool. Pin the client to a version the farm runs (kubectl -n hearth get browserpools shows them), or add a pool for your version; see Pools and scaling.

this farm has no webkit pool for playwright

428 no_pool (Playwright) or 404 no_pool (Selenium: this farm has no firefox pool for webdriver). No pool serves that engine and protocol. Add one under pools:.

no pool named "x" serves chromium over playwright

The ?pool= parameter or hearth:options.pool names a pool that does not exist, or that serves another engine or protocol. Check the name with kubectl -n hearth get browserpools.

unknown browser engine "edge"; use chromium, firefox or webkit

404 unknown_engine. The path must be /playwright/chromium, /playwright/firefox or /playwright/webkit.

this URL serves chromium, but the client asked for firefox

400 engine_mismatch. You called firefox.connect(...) with a /playwright/chromium URL. Use the URL of the engine you connect with.

CDP is only available for chromium

404 no_cdp. Use /cdp/chromium.

connect with Playwright: chromium.connect("wss://<farm>/playwright/chromium?token=<key>")

400 not_websocket. Something sent a plain HTTP request to a WebSocket URL: a browser tab, curl, or a proxy or ingress that strips the Upgrade header. Configure the ingress to pass WebSockets.

this farm has no "safari" browser; use chrome or firefox

400 session not created from /wd/hub. Selenium sessions support browserName chrome and firefox.

set browserName (chrome or firefox), or platformName android or ios

The new-session request had neither. Set one of them.

the new-session body must be JSON

400 invalid argument. The client sent a malformed POST /session.

Keys

this API key is not known to the farm

401 bad_key. The key is wrong, was deleted, or is too new: the operator publishes keys every 3 seconds. Check it with:

curl -s -H "Authorization: Bearer $HEARTH_KEY" "$HEARTH_URL/api/me"

If you made the Secret by hand, check it has the label hearth.testzeus.com/team and the key under data.key.

send an API key as `Authorization: Bearer <key>`, basic auth, or `?token=<key>`

401 missing_key. No key reached the gateway. If you use a URL with user:key@host, check that your client sends basic auth from the URL, and that no proxy strips the Authorization header.

Busy farm

your team is already running its limit of 5 sessions

429 team_limit, Retry-After: 10. The team's maxSessions is reached (queued sessions count too). Run fewer workers, raise the team's limit, or check GET /api/me for sessions you forgot to close: a Selenium session without quit() holds its slot until the 5-minute idle timeout.

no chromium became free within 120s (you were number 7 in line)

429 pool_busy, Retry-After: 15. The pool was full for the whole queue timeout. Causes, most common first:

  • maxSessions of the pool is reached. Raise it.
  • The cluster cannot schedule more browser pods. kubectl -n hearth get pods shows them Pending; kubectl describe pod says why (no CPU or memory, node selector matches nothing). Add nodes or let your node autoscaler do it.
  • Pods start slowly because each new node pulls the browser image (over 1 GB). Raise warm, or pre-pull the image on your nodes.

Raise queueTimeoutSeconds on the pool if waiting longer is fine for your CI.

Sessions that end early

The session's error field (in the UI, or GET /api/sessions/{id}) says why:

error Meaning Fix
max duration reached A Playwright or CDP session ran past the pool's maxSessionSeconds Raise it, or split the test run
ended after no command for too long A Selenium or Appium session sent no command for 5 minutes (devices: the pool's idleTimeoutSeconds) Send commands, or quit() when done
stopped by a user Someone pressed Stop in the UI (or called DELETE /api/sessions/{id})
the client never connected The gateway claimed a pod but the client went away before the session started Usually a client that timed out while queued
never got a browser The request never got a browser or device: the queue timed out, or the client gave up while queued See pool_busy above; raise the client's connect timeout above the queue timeout
the device restarted during the session The device's agent restarted and reported the device free Check the agent's host
the browser or device went away during the session The browser pod or emulator pod disappeared (deleted, evicted, node lost) Check kubectl get events; the slot is freed
the request was abandoned while waiting The request was queued for 20 minutes and its gateway was gone (restarted or killed) Retry; it happens when a gateway dies mid-queue

Pods

the browser pod could not be reached; try again / the browser pod did not answer

502 pod_unreachable. The gateway claimed a pod but could not open a connection to it. The pod may have just died, or a NetworkPolicy blocks the gateway. The chart's policy lets only pods labelled app.kubernetes.io/component: gateway of the same release in; custom gateways need that label.

Browser pods crash or restart on big pages

Raise the pool's resources.memory and resources.shm. Chromium needs a large /dev/shm.

Sessions work but have no video

  • The session was headless; only headed sessions are recorded. Playwright Test asks for headless unless use: { headless: false } is set in playwright.config.
  • No bucket is configured: the gateway's Secret has an empty HEARTH_S3_BUCKET.
  • The upload failed. The browser pod logs artifact upload failed; since the pod is deleted right after, look in your log store. Pods upload through the gateway, so check the gateway's storage settings and its log.

Browser pods stay Running but never become ready

The pod could not register with the gateway. Its log says why (registering failed (401 ...) or heartbeat failed means its token is unknown, for example after Redis lost its state). The operator removes a pod that has not registered after 10 minutes (90 s if it was made from an older template) and creates a new one.

this pod already served a session

409 used, in a browser pod's log. A pod tried to register again after serving a session; pods are single-use. It is harmless: the operator replaces it.

The web UI

this request must come from the farm's own UI

403 cross_origin. A request authenticated with the UI's cookie changed something or opened a WebSocket from another origin (another site, or a script without Origin). Use an API key in a header for scripts and tools.

this session has ended / this session has no browser yet

409 not_running. Live view, take control and Stop work only on running sessions.

the live view is not available

502 no_stream. The pod or the device's agent did not serve a stream. For a headless browser there is nothing to show.

Apps and devices

upload the app first (POST /api/apps or `hearth app upload`) and pass its hearth:app:<sha256> reference

400 app_not_uploaded. appium:app was a URL or a path. Upload it with hearth app upload <file>, the API or the UI, and pass the reference; see Mobile devices.

no app hearth:app:... for your team

404 app_not_found. The reference is mistyped, or another team uploaded it. Apps belong to the team that uploaded them; upload it with your team's key.

send the file name in `x-filename`: an .apk, or a .zip holding one simulator .app

400 bad_app_name. Set the x-filename header to a name ending in .apk, .zip or .app.zip, made of letters, digits, spaces, ., - and _. .ipa files are refused.

apps are limited to 2 GiB / the upload was empty

413 too_large / 400 empty.

the farm has no storage for apps

503 no_storage. No bucket is configured. See Artifacts.

this farm has no android devices

404 no_pool. No device pool matches the platform, appium:deviceName and appium:platformVersion. Check kubectl -n hearth get devicepools and how matching works in Mobile devices.

no android became free within 300s (you were number 2 in line)

429 pool_busy. Every device of the pool is busy or none is ready. Check that agents are heart-beating (READY in kubectl get devicepools, or hearth status).

the device's agent did not answer; try again

502 agent_unreachable. The gateway could not reach the agent's agentUrl. See Device agents on hosts.

the device could not be prepared / the device could not be prepared: the app could not be installed

500 prepare_failed. The agent failed to install the app or start recording; the device then resets. The agent's log has the details (the gateway keeps them out of the client's answer). Check that the app suits the device (an .apk for Android, a simulator build for iOS).

the device did not answer; try again / Appium's own message

502 appium_unreachable when the agent could not be reached for the new session (502 unknown error for a later command); 500 appium_refused with Appium's message when Appium rejects the capabilities.

installing apps or moving files is not allowed; upload apps with POST /api/apps

403 unsupported operation. The session called an install, push or pull endpoint. Upload the app and pass its hearth:app: reference instead.

this mobile: command is not allowed on the farm

403 unsupported operation. mobile: shell, mobile: installApp, file transfer and a few other mobile: commands that reach the host are blocked. See Mobile devices.

bad command path

400 invalid argument. A command path held .., ., ?, #, a backslash or %.

Hosts

Code Message Fix
403 not_admin managing hosts needs an admin team's key (set `admin: true` on the team) Use an admin key, or hearth keys create <team> --admin
401 bad_join_code this join code is unknown, already used or expired; ... hearth hosts join-code <host> (or Reconnect in the UI) and paste the new line
400 plan_does_not_fit ... is more than this host can run well ..., runtime "iOS 27.2" is not installed on this Mac ... Fewer devices, install the runtime, or add another Mac
409 host_exists there is already a host named "mac-1" Pick another name, or reconnect the existing host

More in Add a Mac.

Agents

Code Message Fix
401 missing_token agents send `Authorization: Bearer <agent token>` Give the agent its token
401 bad_token this agent token is not known to the farm Check the token, and that the Secret has the hearth.testzeus.com/agent label
403 wrong_host this token speaks for host "mac-1" host in the agent's config must be the token's host
403 wrong_device device ids from mac-1 must start with "mac-1-"; got "..." Device ids are <host>-<pool>-<n>
403 unknown_pool device pool "x" (ios) is not a DevicePool on this farm; create it first Add the pool under devicePools: with the same name and platform
400 bad_agent_url agentUrl must be an http(s) URL the gateway can reach (not loopback or link-local) Set agent_url to an address gateway pods can route to
400 bad_name artifact names are letters, digits, '.', '-' and '_' Rename the artifact
413 too_large artifact too large Artifacts are limited to 8 GiB

Still stuck?

Collect kubectl -n hearth get pods,browserpools,devicepools, the gateway and operator logs, and open an issue on GitHub. Remove keys and tokens from what you paste.