Skip to content

Troubleshooting & Local Data ​

Most failures can be diagnosed immediately from the returned error message and its attached errorShot screenshot. For workflow runs, open the Runs view to inspect the stopping node, outputs and HAR capture.

1. Locators & Page Scripts ​

"Matched N elements" ​

page_click, page_type and page_select require exactly one match so BrowserPilot never clicks the wrong button silently.

  • Call page_query first to inspect each candidate's index, visible text and bounding rect.
  • Narrow the target with within (supports :has-text("...")), pass index (0-based), or target by role + name / label.

Timeouts, Shadow DOM & Cross-Origin iframes ​

  • Pass pierce: true to search open Shadow DOM and same-origin iframes, with automatic fallback to cross-origin iframes (OOPIFs).
  • To target a specific cross-origin iframe directly, pass frame (a URL substring of that <iframe>) or use page.frameLocator(...) in the SDKs.
  • If an element is covered by a sticky header or modal ad, run page_overlay { "action": "dismiss" } or page_scroll first.

page_script Syntax Errors ​

page_script evaluates a JavaScript expression, not a bare function body:

  • Invalid: return { title: document.title }
  • Valid: (() => ({ title: document.title }))()

(Inside a visual Workflow "Page Script" node, code is wrapped in an async function automatically so return works directly.)

2. MCP, SDK & CLI Connectivity ​

Why does my agent only see 13 tools? ​

BrowserPilot defaults to on-demand (search) mode so 105 schemas do not bloat your model's context window. Have the agent call search_tools (e.g. {"query": "cookie"} or {"query": "captcha"}) to fetch any tool and its schema, or switch Settings → General → Tool list to Full.

401 Unauthorized or Connection Refused ​

  1. Confirm BrowserPilot is running and Settings → General → MCP is enabled.
  2. Read the current url, api and token from mcp.json:
    • Windows: %APPDATA%\BrowserPilot\mcp.json
    • macOS: ~/Library/Application Support/BrowserPilot/mcp.json
    • Linux: ~/.config/BrowserPilot/mcp.json
  3. Ensure 127.0.0.1 bypasses any system HTTP proxy (the official CLI and SDKs bypass loopback proxies automatically).

Non-ASCII Arguments in CLI ​

Always place non-ASCII or nested JSON arguments in a UTF-8 file and invoke browserpilot call <tool> --json-file args.json instead of inline shell quoting.

3. Streaming Media & Captchas ​

  • Video downloads (page_save_media): DASH two-track merges (Bilibili, Douyin, YouTube) and m3u8 streams automatically download ffmpeg into tools/ on first use. When encrypted worker streams cannot be extracted, fall back to page_record_video.
  • Captchas: Geetest v4 sliders are handled automatically by captcha_solve (cv → ddddocr → onnx). Use captcha_read for alphanumeric OCR (requires local Python + ddddocr), captcha_panel for vision-agent coordinate solving, or page_handoff for human verification.

4. Where Local Data Lives ​

All state stays inside your OS user data folder (%APPDATA%\BrowserPilot on Windows, ~/Library/Application Support/BrowserPilot on macOS, ~/.config/BrowserPilot on Linux):

DataRelative Path
MCP / API endpoint & tokenmcp.json
Environments, tab groups, settingsenvs.json, groups.json, settings.json
Workflows & run recordsworkflows/, runs.json, runs/ (error shots & HAR)
Per-environment SQLite history & proxy configprofiles/<env-id>/browserpilot/ (history.db, network.json)
Per-environment Chromium cookie partitionPartitions/<env-id>/
Viewport screenshots & CSV exportsscreenshots/, exports/
Managed ffmpeg binarytools/
Page downloads, saved media & recordingsSystem Downloads folder by default (configurable in Settings)

Copy the entire folder to back up your environments and workflows. Note that files produced by env_export contain plain-text cookies — keep them strictly local.