Troubleshooting
Start every session with webrain doctor — it checks engines, MCP server, CDP
ports (9222/9224/9225), vault, and the Python sidecar. Exit 0 healthy,
2 broken.
The big three
1. Read challenge on every webrain_navigate. Obscura/lightpanda
cannot pass interactive challenges — only real Chrome + stealth_solve.py.
2. Obscura has no paint engine. webrain_screenshot errors loudly, and
Material dropdowns / Google widgets don’t respond to synthetic clicks. Route
interactive SPAs to real Chrome via cdp_urls:["http://127.0.0.1:9222"].
3. Lightpanda’s screenshot is fake. captureScreenshot returns a
placeholder PNG — silently wrong, not an error. And webrain_batch runs
sequentially on it (single browser context).
Symptoms → fixes
Rules of thumb
- Logs go to stderr; MCP speaks JSON on stdout — never redirect stderr
into the stream.
webrain_eval doesn’t reliably await async JS on obscura (returns null) —
use webrain_batch(op=interact, ...) for async work.
webrain_fetch_http needs NO browser (pure HTTP, 10–100× faster for static
pages).
- Material widgets are
combobox/option/radio, not button — check the
ARIA cheat-sheet in webrain_a11y.