Troubleshooting
The first rule is the important one: the app must be running. The hub, MCP endpoint and evidence store live in the Electron process. A CLI or MCP client cannot inspect a product without it.
The app is not running
Symptoms:
- An MCP client cannot connect to
127.0.0.1:7317. - The console is empty.
- A command answers that no session is connected.
Fix:
pnpm devWait for veya:ready. If the process exits, read the veya:error line. The app prints that line instead of hanging.
Ports are taken
| Port | Owner |
|---|---|
5173 | The app under development (pnpm dev:demo). |
5174 | The console dev server. |
7317 | Hub and MCP endpoint. |
5175 | This documentation site (pnpm docs:dev). |
If 7317 is taken, set another port for both the app and the MCP client:
VEYA_HUB_PORT=7417 pnpm devThe MCP URL becomes http://127.0.0.1:7417/mcp. The console's built-in hub URL is fixed at 7317, so the console panels will not follow a custom port in v0.1. The MCP endpoint does.
If 5173 is taken, the demo fails because it uses strictPort. Stop the other process or change the demo port and VEYA_TARGET together.
Electron installation
pnpm install downloads the Electron binary. If the download is blocked, use a mirror and reinstall:
ELECTRON_MIRROR=https://registry.npmmirror.com/-/binary/electron/ pnpm installIf the binary is still missing, remove the Electron package from node_modules and reinstall. A failed Electron download is an installation failure, not an app error.
No product session
Symptoms:
veya_sessionsreturns an empty list.- The console says "No product session yet".
Check:
- The human and agent product windows are open and loaded. The defaults are
VEYA_TARGETandVEYA_AGENT_TARGET(http://127.0.0.1:5173unless changed). pnpm dev:demois running if you are using the demo.- The page is instrumented with
@veya/vite-plugin, and the plugin is active in serve mode. - The page is Vite + React. A page without the runtime does not create a session in v0.1.
- The runtime can reach
ws://127.0.0.1:7317/v1/runtime. A custom hub port requires updatinghubUrl.
pnpm dev retries both product URLs every second, so it is fine to start it before the demo. veya_sessions should show one mode: human and one mode: agent session.
The agent window is missing
If veya_sessions has no mode: agent session, or the agent window stays blank:
VEYA_AGENT_TARGETmust point at an instrumented page; it defaults toVEYA_TARGET.- The agent window uses the
persist:veya-agentpartition under.cache/electron-user-data/Partitions. Clear that directory if a stale profile is stuck. - The Veya preload must expose the window kind. A custom Electron shell without
apps/desktop/electron/preload.tsreports every window ashuman, so the two sessions replace each other. - Both windows need the runtime; a page without the plugin creates no session in either window.
Without a sessionId, MCP tools target the newest agent session. If a tool acts on the wrong page, pass the session id from veya_sessions.
No snapshot
If veya_inspect or veya_context returns null, the session exists but the hub has not received a snapshot yet.
Common causes:
- The page has just loaded; retry after the runtime hello and the first snapshot.
- The runtime sent a malformed snapshot; check the browser console and the hub logs.
- The runtime is not running. Without the plugin there is no session at all.
The context brief is a baseline or truncated
baseline: truewithbaselineReason: "cursor_unavailable"means the cursor is older than the 32-snapshot history, came from another session, or the hub restarted. It is not an error; continue with the newcursor.budget.truncated: trueand non-zeroomittedmean the brief fit its budget and left material out. RaisemaxBytes(up to 65536) or follownext:veya_inspect,veya_events,veya_stateorveya_signals.- The brief reports current failing signals without probing. Call
veya_signalswith aviewportwhen you need a fresh layout and accessibility check. - Reading the brief does not create a history point, so console polling does not invalidate an agent's cursor.
Components have no source
source: null is a fact, not a missing field to invent. It means the build did not annotate that component.
Check:
- The component is rendered through JSX that the plugin transformed.
- The component is inside an
AgentComponent; adata-veya-idalone does not create a node. - The file is inside the Vite project root and is transformed during dev.
- The component is not created by a library that bypasses the plugin.
Signal R008 reports every component without a source location.
MCP cannot connect
- Confirm the app is running and the
veya:readyline printed. - Confirm the URL is
http://127.0.0.1:7317/mcp, or the customVEYA_HUB_PORT. - Use the client's Streamable HTTP transport. Some clients need
"type": "http"explicitly. - Do not use
localhostif the client resolves it to IPv6 and the server is IPv4-only.127.0.0.1is the safe form. - The endpoint has no authentication. It is not a remote service.
veya_perform returns ok: false
Read error.code, error.stepIndex and error.missing:
expectation_timeout— the step atstepIndexdid not see the expected events or state withintimeoutMs. Check that step against the product flow; later steps did not run. The full trace is still available throughveya_trace.action_unavailable— the click target atstepIndexwas not found or could not be clicked. Check the semantic id or selector.steps_required— the perform command arrived without a steps list.target_required— a click command was sent without a target.host_unavailable— the operation needs a window to own the session and this hub has none.
A successful click is not a successful behaviour. If the expected state is wrong, fix that step before assuming the product is broken.
Signals are all passing
A pass can mean the rule had no evidence to inspect.
- R005 and R006 need
veya_signalswith aviewportwhile the Electron host is available. - R007 has no contrast samples from the bundled host in v0.1, so it passes by default.
- R003 and R004 need a failed request. A fresh page that has not loaded data yet has nothing to report.
- R008 only fires for components the app actually reported. A page with no reported components has nothing to check.
Run the rules with a viewport and interact with the product first.
Screenshots and probes fail
Screenshots, input dispatch, geometry and viewport probes use Chrome DevTools Protocol over webContents.debugger. Opening DevTools on a product window can take that window's debugger session away from the app. Screenshots and probes use the window that owns the session.
Close DevTools and retry. The client reattaches on the next command. v0.1 does not emit a cdp.detached timeline event, so a failed probe is the signal to retry rather than an entry to search for.
A standalone hub has no product windows and cannot capture screenshots or run viewport probes.
The console shows an old session
Every page load creates a session. When a newer session arrives for the same URL and mode, the hub marks the old one replacedBy the new one. Human and agent sessions coexist; the console follows the selected session, defaulting to the human one.
If you need the old evidence, query it by session id before reloading. The JSONL store under .veya/ keeps what was written, but the in-memory registry starts empty when the app restarts.
No Fast Refresh
Vite+ inlines Vite, so @vitejs/plugin-react cannot resolve against it and the Veya plugin stays self-contained. Saving a file reloads the page instead of hot-updating it. A reload creates a new session; this is expected.
Reset local state
The hub writes under .veya/ by default. To start clean:
- Stop the app.
- Remove
.veya/if you no longer need the evidence. - Start the app again.
Sessions are held in memory by the running hub; restarting the app clears them even if the JSONL files remain. The agent window's profile lives under .cache/electron-user-data/Partitions; remove that directory separately if you want a clean agent profile.
Documentation site
pnpm docs:devserves the docs onhttp://127.0.0.1:5175.pnpm docs:buildwritesdocs/.vitepress/dist.pnpm docs:previewserves the production build on the preview port.- Missing Chinese pages fail
pnpm checkthrough the i18n parity test.
Known v0.1 gaps
- No packaged desktop app and no published npm packages.
- No shipped CLI; MCP is HTTP.
- No
cdp.detachedevent in the timeline. - No contrast samples for R007 from the bundled host.
- No Fast Refresh.
- No LLM visual or UX judge.
See the roadmap for what is planned.