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.

What you'll learn

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
Key idea

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

SymptomLikely causeFix
A click resolves the wrong elementDuplicate labels, or a hidden lookalikeAdd a direction ("top right") or a relative position
A step fails only after a redesignThe meaning changed, not just the stylingUpdate the intent or add a position hint
A test passes locally but fails in the cloudDifferent viewport, data, or networkReproduce in the same browser mode and inspect the replay
A local server is not reachable in the cloudThe port is not tunnelledUse exposePorts([3000]) or a URL with the port in it
Local mode will not start on LinuxNo graphical displayRun under xvfb-run -a node yourTest.js or use a cloud browser
A local manual run has no replaylocalClient executions are not recorded like cloud sessionsRun in a cloud browser when you need a replay
The video or recording is missingThe execution did not produce one, or it was not downloadedOpen the execution context menu and choose the available download
A session times outThe default remote timeout is too shortUse await browser.setTimeout(5 * 60) in seconds
Browser.start rejects the keyMissing, revoked, or wrong tokenCreate a new key under Settings → API Keys
An email never arrivesWrong inbox name, or the flow did not send itReuse the exact inboxName returned by createEmailAddress
PDF text is missingA PDF is a document, not a normal pageUse openPDF() then getPageText() and join the blocks
An OAuth provider redirects to the real serviceThe app is still using the provider's real domainPoint the auth, token, and user-info URLs at https://oauth.kogiqa.com
MCP tools do not appearThe client did not start the server, or Node is too oldUse Node 20+, re-run the install command, and check the client's MCP log

The debugging loop

  1. Reproduce the failing step with the single-step play button.
  2. Localise the failure with Run Until Here / Run From Here.
  3. Inspect the execution recording and scrub to the failing moment.
  4. Collect evidence with getConsoleLog() and getNetworkHistory().
  5. 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 node or npm is 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-mcp on npm.
  • Run npx kogiqa-mcp@latest once 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-plugins and /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.

Try it yourself

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.

Recap
  • 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.