Troubleshooting
Common problems and how to fix them.
Common problems and how to fix them. Each section starts with what you see.
"That address points to a private network"
Hosted HeyBug runs the browser in our cloud, so it can't reach localhost, 192.168.x.x, 10.x.x.x, 100.64.x.x or other private addresses. It also only reaches ports 80, 443 and 8000 to 9999.
Fixes:
- Open a tunnel to your app and paste the public tunnel URL. A full CI example is in Preview recipes.
- Deploy a preview of the app and test that URL.
"We could not find that address" means the name did not resolve. Check the spelling and that the DNS record is public.
The site is behind a sign-in
If the agent lands on a login page, it can't test what's behind it. Give it a way in:
- Test credentials. Open the project settings and save a test username and password. Use a dedicated test account, never a real person's. Secrets are write-only: after saving, the page shows that they are set but never shows them again. The API is
PUT /api/projects/{projectId}/credentials; useDELETEon the same path to remove them. - Saved sessions. If your login has a code, a captcha or single sign-on, sign in once yourself and save the session for the environment. Later runs reuse it. The API is
/api/projects/{projectId}/session-state, with an optional?environmentId=query. When the session expires, tests land on the login page again; save a fresh one. - Add a line to the run instructions such as "sign in first, then test the dashboard".
"Starting a browser" takes a while
The first step of an exploration shows "Starting a browser". On hosted HeyBug it can take about 20 seconds when the browser service has been idle. That is normal.
If it takes more than a minute:
- Check
GET /api/system/runner. It returnsreachable,version,capacityandactive. Whenreachableisfalse, the browser service is down; try again in a few minutes. - When
activeequalscapacity, other runs are using every browser. Yours waits in the queue.
MCP: 401 or "auth error"
heybug mcp sends HEYBUG_TOKEN to HEYBUG_SERVER. A 401 means the token is missing, wrong, revoked or expired.
- Create a new token under Settings → Tokens (
/settings/tokens) and update theenvblock in your MCP client config. See MCP local stdio. - Make sure
HEYBUG_SERVERpoints at the right server. It defaults tohttp://localhost:8080, which is wrong for hosted HeyBug. - Restart your MCP client after changing the config. Most clients read it only at start.
- The CLI reports the same problem as exit code 3. See CLI.
MCP: the call times out
heybug_run waits up to 15 minutes. Many clients give up sooner.
- Call it with
"wait": false. It returns at once with a run URL, and you read the results later. - Raise the tool timeout in your client, if it has that setting.
- Shorten the job: give a narrower
instructionstext, or test one flow.
Stdout carries protocol messages only. If you see garbled output, check you aren't wrapping heybug mcp in a script that prints to stdout. Logs go to stderr.
The sign-in email never arrives
- Check your spam and promotions folders. Search for the sender name.
- Wait a minute, then request one new link. Use the newest email.
- Open the link on the same device you asked from, and before it expires.
- Corporate mail filters sometimes rewrite or pre-open links, which can use them up. Ask your admin to allow the sender, or use another address.
- On a staging server with
HEYBUG_DEV_LOGIN=1, use the dev login button. It callsPOST /api/auth/dev-loginand sends no email. IfHEYBUG_DEV_LOGIN_EMAILSis set, only those addresses can use it. On production the endpoint returns 404, by design.
The run timed out
What you see: heybug runs wait prints Run wait timed out and exits 6, or the run ends with a timeout status, or a case shows ! Error with a timeout message.
Every run has a per-run timeout (--timeout on runs start, default from the runner budget) and bounded action budgets. The MCP heybug_run tool waits up to 15 minutes before returning timedOut.
Fixes:
- Raise the run timeout:
heybug runs start --project <projectId> --timeout 600. - If the wait itself timed out, raise
--timeoutonruns wait, or pollheybug runs list --project <projectId>. - Check
GET /api/system/runnerand itscapacity/activefields before retrying.
Results are missing or still pending
What you see: heybug results list --project <projectId> is empty, or a run shows fewer cases than expected.
- A run that never produced cases, or that was canceled before the plan landed, has no results. Check the run status first.
- A case stuck in Queued, Writing test or Running while the run is finished means a status refresh missed; refresh the run.
- The triage endpoint returns 404 while triage is pending; call it again after a short wait.
- Failed cases carry Expected and Actual; download evidence from them.
The tunnel is busy
What you see: heybug tunnel start fails, or the app under test is not reachable from the hosted browser.
- Run
heybug tunnel list, then stop the oldest one withheybug tunnel stop <id>. - One workspace can hold a limited number of open tunnels; the server rejects a new one with a conflict while the limit is reached.
- Stop tunnels you no longer use before starting another.
Rate limits, credits and plan limits
- Exit 7 means rate limited or deferred. Wait a moment and retry; the error envelope carries the
rate_limitedcode. - Exit 12 means insufficient credits. Check the balance with
heybug credits. - Exit 13 means the feature is gated by the plan. Check with
heybug usage.
The workspace is paused
Runs wait while a workspace is paused. Resume the workspace, then run heybug doctor again to confirm credentials, API, key and workspace checks pass.
The launch never got a run ID
What you see: the launch failed and the agent has no run to poll, or the run link is missing.
- The agent bootstrap can time out before the tunnel is confirmed, for example
timed out after 50 seconds before the tunnel was confirmed. The tunnel may still exist on the server; checkGET /api/tunnelsbefore retrying. - Do not start a second run for the same project until the first is finished or canceled.
An older CLI or agent is in the loop
- Unknown flag, missing value or argument: exit 2. Upgrade the CLI with the install one-liner, then run
heybug doctor. - Older agents may not send the fields the current server expects; re-run
heybug connectand the bootstrap flow for the agent.
Reading the doctor output
- Lines that end in
okpassed; lines that end infailprint a plain-English fix. - Doctor compares the CLI version with the server version reported on
GET /api/healthzand fails when they disagree.
Still stuck?
Note the run URL and the time, then contact support with those. Don't include passwords or tokens.