Troubleshooting
Most kogiQA problems fall into one of five buckets: the wrong element was resolved, the run happened in a different environment, the recording is not available, the session timed out, or a setup step is missing. Find the bucket first. The fix is usually small.
After this page you should be able to:
- diagnose an element-resolution failure without rewriting the test
- explain why a local result can differ from a cloud result
- find or recover a recording
- fix the most common SDK, email, PDF, OAuth, and MCP setup issues
Change one variable at a time. If a test fails, first reproduce the exact step, then change one thing: the label, the position, the wait, or the environment. Random edits hide the cause.
Start with the mental model
kogiQA resolves intent against the rendered page. Before you inspect code, ask:
- Is the element visible and enabled?
- Is there more than one element with the same meaning?
- Is the page still loading or animating?
- Did the page change between recording and replay?
If the answer is "more than one", use a position hint. If the answer is "still loading", use a validation or a targeted wait instead of a long fixed sleep.
Common problems
| Symptom | Likely cause | Fix |
|---|---|---|
| A click resolves the wrong element | Duplicate labels, or a hidden lookalike | Add a direction ("top right") or a relative position |
| A step fails only after a redesign | The meaning changed, not just the styling | Update the intent or add a position hint |
| A test passes locally but fails in the cloud | Different viewport, data, or network | Reproduce in the same browser mode and inspect the replay |
| A local server is not reachable in the cloud | The port is not tunnelled | Use exposePorts([3000]) or a URL with the port in it |
| Local mode will not start on Linux | No graphical display | Run under xvfb-run -a node yourTest.js or use a cloud browser |
| A local manual run has no replay | localClient executions are not recorded like cloud sessions | Run in a cloud browser when you need a replay |
| The video or recording is missing | The execution did not produce one, or it was not downloaded | Open the execution context menu and choose the available download |
| A session times out | The default remote timeout is too short | Use await browser.setTimeout(5 * 60) in seconds |
Browser.start rejects the key | Missing, revoked, or wrong token | Create a new key under Settings → API Keys |
| An email never arrives | Wrong inbox name, or the flow did not send it | Reuse the exact inboxName returned by createEmailAddress |
| PDF text is missing | A PDF is a document, not a normal page | Use openPDF() then getPageText() and join the blocks |
| An OAuth provider redirects to the real service | The app is still using the provider's real domain | Point the auth, token, and user-info URLs at https://oauth.kogiqa.com |
| MCP tools do not appear | The client did not start the server, or Node is too old | Use Node 20+, re-run the install command, and check the client's MCP log |
The debugging loop
- Reproduce the failing step with the single-step play button.
- Localise the failure with Run Until Here / Run From Here.
- Inspect the execution recording and scrub to the failing moment.
- Collect evidence with
getConsoleLog()andgetNetworkHistory(). - Change one variable and rerun.
const {logs} = await browser.getConsoleLog()
const {networkHistory} = await browser.getNetworkHistory()
console.log("Console:", logs)
console.log("Network:", networkHistory)
Setup problems
Node.js and the SDK
- The SDK requires Node.js 20 or newer.
- Install it with
npm install kogi. - If
nodeornpmis not found, follow Node.js setup. - If an install fails with permissions on macOS/Linux, fix the npm prefix rather than running every command
with
sudo.
Local mode on Linux
local starts the desktop app. On a headless Linux machine there is no display, so start the test under a
virtual display:
xvfb-run -a node yourTest.js
Or use a cloud browser such as chrome instead of local.
MCP and Claude Code
- The Model Context Protocol server is published as
kogiqa-mcpon npm. - Run
npx kogiqa-mcp@latestonce to confirm the server starts. - Add it with
claude mcp add kogiqa-browser npx kogiqa-mcp@latest. - For the plugin, start Claude Code with
claude --plugin-dir ./claude-plugin, then run/reload-pluginsand/mcp. - If a tool is missing, check whether it exists in the MCP tool list. The MCP surface differs slightly from the SDK method names.
When to change the test
Change the test when the intent genuinely changed. Do not change the test just because a class name changed. That is exactly the case kogiQA is designed to survive. If you find yourself adding long sleeps or retries, go back to the execution and find the real cause.
Take a failing test and write down the bucket before changing anything: wrong element, wrong environment, missing recording, timeout, or setup. Then make one change and rerun. If you cannot name the bucket, inspect the execution instead of editing the step.
- Most failures are resolution, environment, recording, timeout, or setup problems.
- Use a position hint for duplicate labels and a validation or targeted wait for timing.
- Reproduce in the same mode before comparing local and cloud results.
- Collect console and network evidence before editing.
- Change one variable at a time.
Still stuck? Contact support at support@atagon.com with the execution ID, the step, and what you expected
to happen.