Troubleshooting
Find answers to common issues. These include problems encountered during setup, job execution, and CI/CD pipeline integration.
Common API Errors
The API gateway intercepts unauthorized or invalid requests before they execute.
Why this happens: The request lacked the required credentials. MCP clients authenticate using the standard Authorization: Bearer <token> header. Direct API callers must send Authorization: Bearer <key> (the REST API rejects x-api-key with 401; only the MCP server also accepts it); SDK callers set the REGRESSIONBOT_API_KEY environment variable.
Solution: Retrieve your API key from the Dashboard. We recommend configuring your client to use the standard Authorization: Bearer <token> header. For MCP integrations using environment variables (such as Codex's bearer_token_env_var), set the configuration parameter to the name of the environment variable (e.g. "REGRESSIONBOT_API_KEY") and export that variable in your shell (export REGRESSIONBOT_API_KEY="your_key"). Do not put the literal API key string directly into the config parameter. The MCP server also still accepts the legacy x-api-key header; the REST API does not.
Why this happens: A run is checked against your allowance before it starts. It costs one comparison for each unique page on each device (a live-vs-live run is not doubled). If that does not fit in what is left, the request is refused: no job is created, nothing is charged, and no jobId is returned. Paid plans count comparisons per calendar month in UTC, which resets at 00:00 UTC on the 1st. A free trial is counted against its own 500 comparisons, not the monthly count, and ends when they are used or the trial window closes.
HTTP/1.1 402 Payment Required
{
"error": "Monthly comparison limit reached: 14800 of 15000 used, this run needs 400.",
"used": 14800,
"limit": 15000,
"requested": 400,
"periodEnd": "2026-12-01T00:00:00.000Z",
"window": "month"
}Solution: Run fewer pages or devices so that requested fits in limit - used, wait until periodEnd, or choose a larger plan on the Dashboard Billing tab. Successful responses carry the same numbers in a usage block, so a CI step can see how much of the month is left. A 402 with only an error field means the trial ended or the plan lapsed (next card).
Why this happens: Your organization's free trial has expired. The free trial includes 500 comparisons or 7 days of access. Alternatively, your paid subscription is no longer active.
Solution: Log into the Dashboard and open the Billing tab. Choosing a plan (Hobby, Starter, or Pro) starts runs again: after a trial it starts your subscription, if your subscription is paused it resumes it, and if it ended (the response says "Your subscription is no longer active.") it starts a new one. Only your organization's owner can choose a plan, so if you aren't the owner, ask them (the Team tab shows who it is).
Scheduled checks: while runs are refused, scheduled checks are skipped without an email for each one. When a subscription is paused, the owners get one email saying the checks are on hold. Schedules, sites and baselines are kept, and each project runs at the first scheduled slot after runs are allowed again.
Why this happens: You queried the status of a Job ID that does not exist or has expired. Visual regression jobs are deleted after 30 days.
Solution: Double-check the Job ID UUID string returned from your start request. Verify you are using the correct target organization namespace.
Why this happens: You triggered a job for an existing project. The parameters in your request body did not match the configuration stored in the project's record. This includes parameters like testOrigin, devices, or paths.
Solution: Omit these parameters from your request to use the saved configuration automatically. Alternatively, trigger the job via POST /project/{name}/run. This endpoint always loads the saved configuration. To update the configuration, use the MCP update_project tool. Note that updating the configuration will invalidate existing baselines.
Why this happens: There is no separate AI allowance to run out of — summaries are not metered, so this is never a quota problem. A page whose only change is in its metadata (a title, a canonical link, a JSON-LD block) has no summary, because nothing on the page looks different. On results from before September 28, 2026, a page could also be left undescribed when its DOM could not be read; those carry a domAssistSkipReason naming why.
Solution: Read the result's changes array. It lists the changes measured on the page, whether or not a summary was written.
Why this happens: Another job has approved and updated the project baseline since this test run executed. Approving the outdated job would overwrite the newer baseline changes.
Solution: Re-run the visual check to compare the branch changes against the latest updated baseline.
Handling Failed Jobs
If a visual regression job enters the FAILED state, the worker could not capture one or more pages. Common reasons include:
- DNS Failures: The host could not be resolved from inside the cloud network. Examples include
localhostor local company development URLs. - SSL Errors: Self-signed certificates are used on staging servers. Use a publicly trusted certificate for environments you want the cloud workers to capture.
- Authentication Walls: Basic auth, OAuth redirect screens, or captcha verification pages prevent headless browser crawls. A gate that answers with an error status fails the page with one of the messages under Page errors.
A single page can also end with status: "ERROR" while the rest of the job completes. If the error says "This capture has no DOM tree", the page's DOM could not be read, and nothing is compared without it. Run the page again. A page uploaded by an SDK must include its DOM snapshot.
Page errors
A page fails with one of these messages, in the summary's errors[].errorMessage, when one side answered with an error status and the page could not be compared. If the site under test answers with an error while the other site loads the page, the page always fails this way and its baseline is left unchanged. That includes a firewall or CDN block page (“Access Denied”, “Just a moment...”).
An error page that can be read is otherwise compared like any page. A block page served by both sites usually matches itself, so the page passes; a styled 404 on one side shows up as a changed page rather than a new page. If every page of a run passes but you expected changes, open one in the viewer to check the site was actually reached.
- “Page missing: HTTP 404 from …, while … still serves it”: the page is gone from the site under test but still exists on the site it is compared with. Restore it, or redirect it.
- New page (not an error): when the other site answers 404 or 410 and the site under test loads, the page is reported in
newPages(counted innewPageCount): “New page: not on the base, so there was nothing to compare.” It is not a failure and not a regression. A page missing on the site under test is still an error, and so is a 5xx or a timeout on the other site (“Baseline page failed to load: HTTP 500 …”). - “Page refused — check the project's gate credentials: HTTP 401 …”: the site asked for a password. Store it on the project as
testAuth(orbaseAuthfor the base site). See Gated Preview URLs. - “Page refused — the site's firewall or gate blocked the capture: HTTP 403 …”: a firewall, CDN or bot check turned the capture away. Credentials do not help; allowlist the capture IPs (IP Allowlist).
- “Page failed to load: HTTP 5xx …”: the site errored. Check the site, then run the page again.
- “HTTP … from … and HTTP … from …: the page loads on neither origin”: both sites failed, usually a URL that does not exist on either. Remove it from the run, or fix the sitemap.
- “The page was empty when read”: the page loaded without an error status, but its body was empty when it was read.
Timeouts & Page Height Limits
Headless visual workers allocate a standard 30-second budget. This budget is used for screenshot capture and lazy-load scroll execution.
Tips to fix timeouts:
- Exclude large media or infinite-scrolling pages from your sitemaps. Examples include product lists or social feeds.
- Provide dynamic element masking using the
data-vr-maskattribute. This bypasses dynamic elements. - Limit comparison depths when invoking sitemap crawler endpoints.
Additionally, visual workers enforce a safe page height limit of 36,000 physical pixels (divided by the Device Pixel Ratio, or DPR). This prevents high-memory crashes on extremely tall pages. For example, at a 1x device scale, the limit is 36,000px; at 2x scale, it is 18,000px; and at 3x scale, it is 12,000px.
Capped Screenshot Fallback Behavior:
If a page exceeds this height limit or causes a browser capture timeout, the system does not fail the job. Instead, it automatically captures a **capped full-page screenshot** up to the maximum safe height. The cap applies to the screenshot, which is a picture for you to look at. The comparison reads the page's DOM.
If a long page's screenshot shows only its top portion, verify that the page height fits within the safe limits, or use viewports or device profiles with lower scale factors.
Change Metrics & Noise
RegressionBot compares the two pages' DOM trees, not their pixels. Anti-aliasing and other rendering differences in the screenshots are therefore never reported as changes.
Diff Percentage
diffPercentage is the share of the page covered by the elements that changed (the union of their boxes). It tells you how much of the page changed, not whether the change matters. A small text edit can score under 1% and is still a change.
Visual Match Score
visualMatchScore is deprecated: it is 100 minus diffPercentage, not a measure of how alike two pictures look, and the summary's overallScore is its average. Both are kept for existing callers. Read changed and changes instead.
What is already left out:
- Parts of the page that changed on their own while it was captured, such as carousels and counters. The page is read twice, 300ms apart, and anything that differs between the two reads is marked
dynamicand left out ofchanges. - Edits where only a date or time changed. They are listed with
valueOnly: "date"but do not make the page changed. - Content that was only pushed down by a change above it.
Gate on changed, not on a threshold, and read changes to see what happened:
await job.waitForCompletion();
const summary = await job.getSummary();
for (const regression of summary.regressions) {
if (!regression.changed) continue;
for (const c of regression.changes ?? []) {
console.log(regression.url, c.type, c.element, c.before ?? '', c.after ?? '');
}
}A change you can see but that is not reported:
A change that exists only in how the page is painted can go unreported. One example is an image that failed to decode while its element and source stayed the same. Many such cases are still caught: broken images, canvas content, and web fonts that failed to load (reported as a font-failed change). If you spot one in the screenshots, open the page in the inspect view to compare them.
Results created before September 28, 2026 (kept for 30 days) were compared by pixels. On those, diffPercentage is the share of pixels that differed and visualMatchScore is a pixel similarity score.
Unexpected Sticky/Fixed Element Diffs
Seeing a change reported on a header, nav, or cookie bar — either on a project you didn't touch, or a position change on an element that looks the same in both screenshots?
Why this happens: RegressionBot captures the full page from the top, so position: fixed and position: sticky elements render once at their at-rest position rather than repeating down the page. Three different situations put a change on them, and they have different answers.
- A baseline older than September 5, 2026. A baseline captured before v2.7.1 recorded those elements through an older rewriting step, so the element reads
relativeon the baseline side andstickyon the current side. The first managed run after that reports apositionchange on the header, nav or cookie bar. This is a one-time diff: approve it, and the run after that compares clean. As of v2.9.1 (September 12, 2026) this is reported rather than filtered out — earlier releases said such a change was usually classified as a reposition and flagged nothing, which is no longer how it behaves. - Someone actually pinned the element. Changing an element from
statictosticky— making a header stay put instead of scrolling away — moves no pixels while the page sits at the top. The two screenshots look identical, and the captured document is the only witness to it. RegressionBot reports this as apositionchange even though the screenshots look the same. This is a real change to the page, not noise. Approve it only if you meant to make it. - An element that renders badly at rest on every run. A fixed element may sit somewhere unhelpful at rest, such as a bottom-anchored banner landing over the first screen. That is not a one-time diff, and approving it will not make it go away.
Telling them apart: if the project's baselines were captured or last approved before September 5, 2026, start with case 1. If the same element is flagged again on the run after you approve, you are in case 3. If the baselines are newer than that date and the change is a position value on an element that looks the same in both screenshots, check whether someone changed that element's CSS — that is case 2, and the run is telling you something true.
Solution: Open the run in the dashboard, or read changes and regressionbotSummary, and confirm the change is confined to the header, nav or banner and is a position value. For case 1, approve the affected pages to update your baselines. For case 2, treat it as any other change to the page: approve it if the pinning was intended, reject it if it was not. Live-vs-live comparisons are unaffected by case 1; both sides are captured the same way. For an element that renders somewhere unhelpful on every run, use customCss to reposition or hide it — it is applied last, so it overrides the site's own rules. See Custom CSS Injection.
Before you change it: customCss changes what a capture looks like, so changing it invalidates every baseline for the project. The next run re-captures everything and every result shows isNewBaseline: true; the run after that compares. See Baseline Invalidation.
# Reposition or hide a fixed element that renders somewhere unhelpful at rest
curl -X PUT https://api.regressionbot.com/project/my-site \
-H "Authorization: Bearer $REGRESSIONBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "customCss": "#sticky-banner { display: none !important; }" }'Initial Job (Empty Baseline)
Initial jobs started from the API, the CLI or an AI agent run without prior baselines, so nothing is compared. RegressionBot treats this as a successful execution, which means a gate that only checks regressionCount == 0 goes green on a project that has never been compared. Gate on newBaselineCount == 0 as well, or run twice. The dashboard's guided first run is different: it captures the baseline and compares straight away, and is charged once. It marks each page result status with isNewBaseline: true. Subsequent jobs will automatically compare against this newly established baseline.
Short Screenshot URLs
Troubleshoot common issues when using shortened, clickable screenshot redirect URLs.
Why this happens: The short screenshot URL token has expired. Redirection tokens are only valid for one hour.
Solution: Request the job summary again using the API. This generates fresh short URLs and new tokens in the database.
Why this happens: You requested the job summary before the job finished processing. The status is still PROCESSING or SUMMARIZING.
Solution: Poll the job status endpoint (/job/{jobId}). Wait for the status to become COMPLETED, APPROVED, RESOLVED (every page decided, at least one rejected), or FAILED before fetching the summary. A loop that omits RESOLVED never ends on a run with a rejected page. Allow up to 40 minutes before giving up.
Why this happens: The backend fell back to standard pre-signed URLs. This is caused by a database write error when saving short-lived tokens.
Solution: Check the RegressionBot system status page. Alternatively, contact support. The client received the response successfully. Your network connection is functioning correctly.