@weavetab/mcp 2.5.0-beta.5 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/AGENTS.md +49 -49
  2. package/ARCHITECTURE.md +590 -590
  3. package/README.md +216 -100
  4. package/SECURITY.md +207 -207
  5. package/TROUBLESHOOTING.md +373 -365
  6. package/dist/anticaptcha/detector.js +395 -395
  7. package/dist/anticaptcha/solver.js +130 -130
  8. package/dist/cdp/bridge.js +73 -73
  9. package/dist/cdp/connector.js +46 -22
  10. package/dist/cdp/extension.js +34 -34
  11. package/dist/cdp/helpers.js +174 -174
  12. package/dist/cdp/pruner.js +195 -195
  13. package/dist/cdp/ref_cache.js +66 -66
  14. package/dist/cdp/security.js +10 -10
  15. package/dist/cdp/verify.js +57 -57
  16. package/dist/cdp/walker.js +563 -525
  17. package/dist/cli/plugin.js +26 -3
  18. package/dist/config/loader.d.ts +0 -3
  19. package/dist/config/loader.js +0 -9
  20. package/dist/index.js +0 -4
  21. package/dist/intelligence/intent.js +81 -81
  22. package/dist/intelligence/sessionMemory.js +2 -2
  23. package/dist/overlay/ghost.js +22 -22
  24. package/dist/overlay/injector.js +89 -89
  25. package/dist/plugin/extension_bridge.js +54 -54
  26. package/dist/plugin/interface.d.ts +7 -0
  27. package/dist/plugin/loader.js +3 -4
  28. package/dist/plugin/schema.d.ts +11 -0
  29. package/dist/plugin/schema.js +59 -0
  30. package/dist/security/guard.js +18 -18
  31. package/dist/sensors/actionability.js +167 -167
  32. package/dist/sensors/guard.js +29 -29
  33. package/dist/sensors/network.js +15 -17
  34. package/dist/server.d.ts +1 -1
  35. package/dist/server.js +173 -144
  36. package/dist/state/delta.js +6 -7
  37. package/dist/tools/automation.js +85 -85
  38. package/dist/tools/canvas.js +48 -25
  39. package/dist/tools/checkpoint.js +94 -35
  40. package/dist/tools/click.js +52 -41
  41. package/dist/tools/clipboard.js +80 -74
  42. package/dist/tools/design_extract.js +441 -441
  43. package/dist/tools/dialog.js +13 -13
  44. package/dist/tools/emulation.d.ts +2 -0
  45. package/dist/tools/emulation.js +7 -0
  46. package/dist/tools/fill.js +344 -347
  47. package/dist/tools/find.js +78 -52
  48. package/dist/tools/highlight.js +67 -67
  49. package/dist/tools/inspect.js +54 -25
  50. package/dist/tools/key.js +42 -35
  51. package/dist/tools/navigate.d.ts +1 -1
  52. package/dist/tools/navigate.js +35 -35
  53. package/dist/tools/office/parse.js +62 -18
  54. package/dist/tools/pdf.d.ts +9 -0
  55. package/dist/tools/pdf.js +7 -4
  56. package/dist/tools/performance.d.ts +11 -4
  57. package/dist/tools/performance.js +94 -42
  58. package/dist/tools/performance_test.d.ts +2 -2
  59. package/dist/tools/performance_test.js +69 -69
  60. package/dist/tools/pointer.js +116 -116
  61. package/dist/tools/read.js +99 -67
  62. package/dist/tools/recording.js +9 -0
  63. package/dist/tools/scrape.js +146 -146
  64. package/dist/tools/screenshot.d.ts +2 -0
  65. package/dist/tools/screenshot.js +46 -4
  66. package/dist/tools/scroll.d.ts +3 -1
  67. package/dist/tools/scroll.js +13 -15
  68. package/dist/tools/select.d.ts +3 -0
  69. package/dist/tools/select.js +131 -124
  70. package/dist/tools/snapshot.js +8 -6
  71. package/dist/tools/storage.d.ts +5 -1
  72. package/dist/tools/storage.js +16 -0
  73. package/dist/tools/tabs.d.ts +7 -5
  74. package/dist/tools/tabs.js +79 -26
  75. package/dist/tools/thought.js +8 -8
  76. package/dist/tools/type.js +274 -274
  77. package/dist/tools/type_secret.js +23 -23
  78. package/dist/tools/upload.js +3 -3
  79. package/dist/tools/video_compiler.js +9 -0
  80. package/dist/tools/wait.js +35 -35
  81. package/dist/version.d.ts +1 -1
  82. package/dist/version.js +1 -1
  83. package/docs/DOCUMENTATION.md +583 -585
  84. package/docs/PLUGINS.md +139 -121
  85. package/docs/TOOLS.md +3 -4
  86. package/docs/architecture/blind-injection.md +83 -83
  87. package/docs/architecture/overview.md +49 -49
  88. package/docs/configuration/configuration.md +39 -27
  89. package/docs/configuration/folders.md +62 -55
  90. package/docs/desktop-automation/electron-apps.md +225 -214
  91. package/docs/get-started/installation.md +1 -1
  92. package/docs/get-started/introduction.md +60 -60
  93. package/docs/get-started/quickstart.md +2 -2
  94. package/docs/get-started/setup-wizard.md +1 -1
  95. package/docs/intelligence/site-profiles.md +151 -151
  96. package/docs/tools/tools.md +582 -631
  97. package/docs/troubleshooting/trouble-loop.md +31 -31
  98. package/ext-dist/background.js +415 -415
  99. package/ext-dist/content.js +2527 -2527
  100. package/ext-dist/dashboard.html +583 -583
  101. package/ext-dist/hud/hud.js +3 -3
  102. package/ext-dist/hud/index.html +20 -20
  103. package/ext-dist/manifest.json +73 -73
  104. package/ext-dist/styles.css +223 -223
  105. package/mcp.json +796 -805
  106. package/package.json +8 -8
  107. package/server.json +23 -23
  108. package/smithery.yaml +7 -11
  109. package/dist/cdp/walker.test.d.ts +0 -2
  110. package/dist/cdp/walker.test.js +0 -172
  111. package/dist/intelligence/sessionMemory.test.d.ts +0 -2
  112. package/dist/intelligence/sessionMemory.test.js +0 -62
  113. package/dist/intelligence/trail.test.d.ts +0 -2
  114. package/dist/intelligence/trail.test.js +0 -110
  115. package/dist/state/cache.test.d.ts +0 -2
  116. package/dist/state/cache.test.js +0 -76
  117. package/dist/state/delta.test.d.ts +0 -2
  118. package/dist/state/delta.test.js +0 -279
  119. package/dist/state/groups.d.ts +0 -15
  120. package/dist/state/groups.js +0 -80
  121. package/dist/tools/accessibility.d.ts +0 -14
  122. package/dist/tools/accessibility.js +0 -32
  123. package/dist/tools/ask.d.ts +0 -14
  124. package/dist/tools/ask.js +0 -49
  125. package/dist/tools/click_and_wait.d.ts +0 -33
  126. package/dist/tools/click_and_wait.js +0 -149
  127. package/dist/tools/drag.d.ts +0 -15
  128. package/dist/tools/drag.js +0 -29
  129. package/dist/tools/geo.d.ts +0 -19
  130. package/dist/tools/geo.js +0 -29
  131. package/dist/tools/github/analyze.d.ts +0 -4
  132. package/dist/tools/github/analyze.js +0 -113
  133. package/dist/tools/github/cache.d.ts +0 -21
  134. package/dist/tools/github/cache.js +0 -28
  135. package/dist/tools/github/index.d.ts +0 -19
  136. package/dist/tools/github/index.js +0 -40
  137. package/dist/tools/github/issues.d.ts +0 -9
  138. package/dist/tools/github/issues.js +0 -88
  139. package/dist/tools/github/pr.d.ts +0 -5
  140. package/dist/tools/github/pr.js +0 -88
  141. package/dist/tools/github/rateLimiter.d.ts +0 -4
  142. package/dist/tools/github/rateLimiter.js +0 -46
  143. package/dist/tools/github/read.d.ts +0 -34
  144. package/dist/tools/github/read.js +0 -74
  145. package/dist/tools/github/repoContext.d.ts +0 -20
  146. package/dist/tools/github/repoContext.js +0 -129
  147. package/dist/tools/hover.d.ts +0 -19
  148. package/dist/tools/hover.js +0 -57
  149. package/dist/tools/integration.test.d.ts +0 -2
  150. package/dist/tools/integration.test.js +0 -96
  151. package/dist/tools/macro_compiler.d.ts +0 -7
  152. package/dist/tools/macro_compiler.js +0 -82
  153. package/dist/tools/mouse.d.ts +0 -21
  154. package/dist/tools/mouse.js +0 -62
  155. package/dist/tools/response.d.ts +0 -129
  156. package/dist/tools/response.js +0 -5
  157. package/dist/tools/wait_for.d.ts +0 -23
  158. package/dist/tools/wait_for.js +0 -30
  159. package/dist/tools/windows.d.ts +0 -22
  160. package/dist/tools/windows.js +0 -57
@@ -1,365 +1,373 @@
1
- # Weavetab MCP Troubleshooting Guide
2
-
3
- > **Version:** 2.5.0 (Beta) | **Package:** `@weavetab/mcp` | **Last Updated:** August 2026
4
-
5
- This guide covers common issues and their solutions when working with Weavetab's MCP tools.
6
-
7
- ---
8
-
9
- ## Table of Contents
10
-
11
- - [Common Issues](#common-issues)
12
- - [Configuration Issues](#configuration-issues)
13
- - [Browser Connection Issues](#browser-connection-issues)
14
- - [Performance Issues](#performance-issues)
15
- - [Security Issues](#security-issues)
16
- - [Debugging Tips](#debugging-tips)
17
-
18
- ---
19
-
20
- ## Common Issues
21
-
22
- ### 1. `browser_map` returns "skipped: true" permanently
23
-
24
- **Symptom:** `browser_map` consistently returns a JSON object with `skipped: true` and refuses to map the page, citing a `w:NN` ref that doesn't exist on the current page.
25
-
26
- **Cause:** Weavetab's "smart skip" logic prevents wasting tokens on duplicate maps if the DOM hasn't changed. However, cross-session stale state on disk can poison this detection.
27
-
28
- **Solutions:**
29
- - Pass `force: true` to `browser_map` to force a rebuild
30
- - Navigate to a new page (which clears the URL-specific skip lock)
31
- - Clear the cache: `Weavetab reset` to clear all session state
32
-
33
- **Example:**
34
- ```typescript
35
- browser_map({ force: true })
36
- ```
37
-
38
- ---
39
-
40
- ### 2. `browser_fill` reports "0 succeeded" but the fields actually changed
41
-
42
- **Symptom:** The tool fills the form perfectly, but the MCP tool response says the fields failed to apply.
43
-
44
- **Cause:** (Fixed in v2.5.0+) Previously, verification was backwards. If you see this in older versions, upgrade to the latest version.
45
-
46
- **Solution:** None needed on v2.5.0+. The verification logic correctly compares pre-mutation and post-mutation state.
47
-
48
- ---
49
-
50
- ### 3. `browser_type` appends text instead of replacing it
51
-
52
- **Symptom:** When trying to type "NEW VALUE" into a field containing "Jane", the field becomes "JaneNEW VALUE".
53
-
54
- **Cause:** The auto-clear logic relies on keyboard shortcuts (Ctrl+A, Delete) which can fail if the element loses focus during the split-second execution.
55
-
56
- **Solution:** (Fixed in v2.5.0+) Auto-clear now uses atomic JavaScript evaluation to clear fields securely before typing. For older versions, use `clearFirst: true` parameter.
57
-
58
- **Example:**
59
- ```typescript
60
- browser_type({ id: "w:1", text: "NEW VALUE", clearFirst: true })
61
- ```
62
-
63
- ---
64
-
65
- ### 4. `browser_select` reports success but the value immediately reverts
66
-
67
- **Symptom:** The dropdown changes, but immediately snaps back to the old value, yet the tool reports `success: true`.
68
-
69
- **Cause:** Frameworks like React and Vue control form state asynchronously. If Weavetab checks too quickly, it sees the changed DOM before React overrides it.
70
-
71
- **Solution:** The tool now implements a 400ms multi-pass verification window for dropdowns to detect asynchronous reversion. If the issue persists, try using `browser_fill` with a small delay.
72
-
73
- ---
74
-
75
- ### 5. `browser_click` by label takes 50+ seconds
76
-
77
- **Symptom:** `browser_click({ label: "Submit" })` works, but the command hangs for nearly a minute before returning.
78
-
79
- **Cause:** Clicking by label requires a full DOM scan. If the click triggers a navigation, older versions would synchronously rebuild the heavy DOM map of the *new* page before returning.
80
-
81
- **Solutions:**
82
- - **Best Practice:** Always use `ref` IDs (`w:42`) from `browser_map` rather than text labels
83
- - **Fixed in v2.5.0+:** Label clicks now use an LRU cache, and post-navigation DOM mapping is deferred
84
-
85
- **Example:**
86
- ```typescript
87
- // Get fresh refs
88
- const map = await browser_map()
89
- // Use ref instead of label
90
- browser_click({ id: "w:42" })
91
- ```
92
-
93
- ---
94
-
95
- ### 6. `browser_inspect` returns `null` for boxModel or styles
96
-
97
- **Symptom:** Inspecting an element returns `null` for its box model, preventing layout debugging.
98
-
99
- **Cause:** The CDP query fired before the browser finished painting the layout.
100
-
101
- **Solution:** The tool now automatically waits 100ms for layout settling and retries up to 3 times. If the issue persists, manually add a small delay before inspection.
102
-
103
- ---
104
-
105
- ### 7. `stuck_warning` fires but the page clearly changed
106
-
107
- **Symptom:** The tool reports `stuck_warning: true`, but the visual page or text labels visibly changed.
108
-
109
- **Cause:** The warning previously relied on strict text matching.
110
-
111
- **Solution:** `stuck_warning` now respects the underlying `delta` computation. If the DOM changed, the warning will not fire. If you still see false positives, use `browser_map({ force: true })` or `browser_wait({ reset_loop: true })` to manually reset.
112
-
113
- ---
114
-
115
- ### 8. Extension not loading in headless mode
116
-
117
- **Symptom:** The Weavetab extension features (HUD, Voice UI, etc.) don't appear in headless mode.
118
-
119
- **Cause:** Chrome extensions don't load in headless mode by default.
120
-
121
- **Solution:** Use headed mode (`headless: false` in config) or use the `--headless=new` Chrome flag which supports some extension features.
122
-
123
- ---
124
-
125
- ## Configuration Issues
126
-
127
- ### 1. Domain blacklist not working
128
-
129
- **Symptom:** Weavetab allows navigation to blacklisted domains.
130
-
131
- **Cause:** Domain blacklist configuration may not be loaded correctly.
132
-
133
- **Solution:**
134
- - Verify `~/.Weavetab/policy.json` exists and is valid JSON
135
- - Check that the domain pattern matches (wildcards use `*` not regex)
136
- - Restart Weavetab after modifying policy.json
137
-
138
- **Example policy.json:**
139
- ```json
140
- {
141
- "policies": [
142
- {
143
- "pattern": "*.banking.com",
144
- "mode": "deny"
145
- }
146
- ]
147
- }
148
- ```
149
-
150
- ---
151
-
152
- ### 2. RBAC permissions not enforced
153
-
154
- **Symptom:** Restricted roles can access tools they shouldn't.
155
-
156
- **Cause:** Role configuration may not be set correctly.
157
-
158
- **Solution:**
159
- - Verify `role` is set in `~/.Weavetab/config.json`
160
- - Check that the role is one of: `admin`, `system`, `viewer`, `automation`
161
- - Restart Weavetab after changing roles
162
-
163
- ---
164
-
165
- ### 3. Secrets not being injected
166
-
167
- **Symptom:** `browser_type_secret` fails to find the secret.
168
-
169
- **Cause:** Secrets file may not exist or key may be misconfigured.
170
-
171
- **Solution:**
172
- - Verify `~/.Weavetab/secrets.json` exists
173
- - Check that the key matches exactly (case-sensitive)
174
- - For project-scoped secrets, verify `./.Weavetab/secrets.json` exists
175
- - Use `Weavetab secrets list` to verify keys are registered
176
-
177
- ---
178
-
179
- ## Browser Connection Issues
180
-
181
- ### 1. "CDP connection failed" error
182
-
183
- **Symptom:** Weavetab cannot connect to Chrome.
184
-
185
- **Cause:** Chrome may not be running with remote debugging enabled, or another process is using the CDP port.
186
-
187
- **Solution:**
188
- - Start Chrome with remote debugging: Check if Chrome is running and listening on the expected port
189
- - Check if another Weavetab instance is running and bound to the port
190
- - Check Weavetab logs for port conflicts and restart
191
- - Verify port 9222 is not in use: `netstat -an | grep 9222` (Linux/macOS) or `netstat -an | findstr 9222` (Windows)
192
-
193
- ---
194
-
195
- ### 2. Browser crashes on startup
196
-
197
- **Symptom:** Chrome crashes immediately when Weavetab tries to connect.
198
-
199
- **Cause:** Extension incompatibility or corrupted Chrome profile.
200
-
201
- **Solution:**
202
- - Try running without extension: Set `"extension": false` in config
203
- - Use a fresh Chrome profile: Set `profileDir` to a new directory
204
- - Check Chrome version compatibility (requires Chrome 90+)
205
- - Disable hardware acceleration in Chrome settings
206
-
207
- ---
208
-
209
- ### 3. Multiple browser instances conflict
210
-
211
- **Symptom:** Weavetab connects to wrong Chrome instance or fails to connect.
212
-
213
- **Cause:** Multiple Chrome instances with remote debugging enabled.
214
-
215
- **Solution:**
216
- - Use different CDP ports for each instance
217
- - Specify port in Weavetab config: `cdpPort: 9223`
218
- - Close other Chrome instances before starting Weavetab
219
-
220
- ---
221
-
222
- ## Performance Issues
223
-
224
- ### 1. High memory usage
225
-
226
- **Symptom:** Weavetab process consuming excessive memory (>500MB).
227
-
228
- **Cause:** Large DOM caches or memory leaks in long-running sessions.
229
-
230
- **Solution:**
231
- - Clear cache: `Weavetab reset`
232
- - Reduce `maxActionsPerMinute` to slow down execution
233
- - Enable `prune: true` in `browser_map` to reduce cache size
234
- - Restart Weavetab periodically for long-running sessions
235
-
236
- ---
237
-
238
- ### 2. Slow tool execution
239
-
240
- **Symptom:** Tools taking longer than expected (>100ms).
241
-
242
- **Cause:** Network latency, large DOM trees, or slow CDP responses.
243
-
244
- **Solution:**
245
- - Use `delta: true` in `browser_map` to avoid full DOM walks
246
- - Enable `prune: true` to reduce DOM size
247
- - Use `fast: true` in click operations for faster execution
248
- - Check network connection and Chrome performance
249
-
250
- ---
251
-
252
- ### 3. Token usage too high
253
-
254
- **Symptom:** LLM context filling up quickly with DOM data.
255
-
256
- **Cause:** Full DOM maps on every read.
257
-
258
- **Solution:**
259
- - Use `browser_map({ delta: true, prune: true })` for maximum efficiency
260
- - Use `browser_find` instead of `browser_map` for text searches
261
- - Use `browser_scrape` for targeted data extraction
262
- - Reduce `limit` parameter in `browser_map` for smaller results
263
-
264
- ---
265
-
266
- ## Security Issues
267
-
268
- ### 1. Secrets appearing in logs
269
-
270
- **Symptom:** Sensitive data visible in audit logs.
271
-
272
- **Cause:** Using `browser_type` instead of `browser_type_secret`.
273
-
274
- **Solution:**
275
- - Always use `browser_type_secret` for credentials
276
- - Verify secrets are properly masked in logs as `[REDACTED]`
277
- - Check that `secrets.json` has correct permissions (`chmod 600`)
278
-
279
- ---
280
-
281
- ### 2. Domain policy not blocking sensitive sites
282
-
283
- **Symptom:** Can navigate to domains that should be blocked.
284
-
285
- **Cause:** Policy not configured or pattern doesn't match.
286
-
287
- **Solution:**
288
- - Verify policy.json syntax and patterns
289
- - Use `*.domain.com` pattern for subdomain matching
290
- - Restart Weavetab after policy changes
291
- - Check audit logs to see if policy is being evaluated
292
-
293
- ---
294
-
295
- ## Debugging Tips
296
-
297
- ### Enable DevMode
298
-
299
- Set `devMode: true` in `~/.Weavetab/config.json` to see:
300
-
301
- - Real-time tool execution timing
302
- - Token usage estimates
303
- - Detailed error messages
304
- - HUD overlay in browser
305
-
306
- ### Check Audit Logs
307
-
308
- Review `~/.Weavetab/logs/audit.log` for:
309
-
310
- - Tool invocation history
311
- - Error messages and stack traces
312
- - Domain policy violations
313
- - Security events
314
-
315
- ### Use Verbose Logging
316
-
317
- Set environment variable for verbose output:
318
-
319
- ```bash
320
- DEBUG=weavetab:* Weavetab
321
- ```
322
-
323
- ### Manual Browser Inspection
324
-
325
- Connect to Chrome DevTools directly:
326
-
327
- 1. Start Chrome with remote debugging
328
- 2. Navigate to `chrome://inspect`
329
- 3. Click "inspect" on the target page
330
- 4. Use DevTools to manually inspect DOM and network
331
-
332
-
333
-
334
- ## General Fallbacks
335
-
336
- If a tool fails:
337
-
338
- 1. **Always use `browser_map`** to get fresh `ref` IDs (`w:NN`) after navigation or dynamic changes
339
- 2. If `browser_click` by `ref` fails because the element is occluded or unstable, fall back to `browser_click` with raw `x/y` coordinates
340
- 3. If an element is hidden inside a shadow DOM, pass `ax_tree: true` to `browser_map` to bypass the standard DOM walker and read the raw accessibility tree
341
- 4. If typing fails, try `paste: true` mode or use `browser_eval` to set the value directly
342
- 5. If navigation hangs, try `force: true` or check for blocking dialogs with `browser_dialog`
343
-
344
- ---
345
-
346
- ## Getting Help
347
-
348
- If you continue to experience issues:
349
-
350
- 1. **Check the logs** — Review `~/.Weavetab/logs/` for detailed error information
351
- 2. **Search GitHub Issues** — Check if your issue has already been reported
352
- 3. **Create a minimal reproduction** — Provide steps to reproduce the issue
353
- 4. **Include environment details** — OS, Node version, Chrome version, Weavetab version
354
- 5. **Report via GitHub** — Open an issue with all relevant information
355
-
356
- **For security issues**, please follow the reporting process in [SECURITY.md](SECURITY.md).
357
-
358
- ---
359
-
360
- ## Additional Resources
361
-
362
- - [Architecture Documentation](ARCHITECTURE.md)
363
- - [Tool Reference](docs/tools/tools.md)
364
- - [Security Policy](SECURITY.md)
365
- - [Contributing Guidelines](CONTRIBUTING.md)
1
+ # Weavetab MCP Troubleshooting Guide
2
+
3
+ > **Version:** 2.5.1 | **Package:** `@weavetab/mcp` | **Last Updated:** August 2026
4
+
5
+ This guide covers common issues and their solutions when working with Weavetab's MCP tools.
6
+
7
+ ---
8
+
9
+ ## Table of Contents
10
+
11
+ - [Common Issues](#common-issues)
12
+ - [Configuration Issues](#configuration-issues)
13
+ - [Browser Connection Issues](#browser-connection-issues)
14
+ - [Performance Issues](#performance-issues)
15
+ - [Security Issues](#security-issues)
16
+ - [Debugging Tips](#debugging-tips)
17
+
18
+ ---
19
+
20
+ ## Common Issues
21
+
22
+ ### 1. `browser_map` returns "skipped: true" permanently
23
+
24
+ **Symptom:** `browser_map` consistently returns a JSON object with `skipped: true` and refuses to map the page, citing a `w:NN` ref that doesn't exist on the current page.
25
+
26
+ **Cause:** Weavetab's "smart skip" logic prevents wasting tokens on duplicate maps if the DOM hasn't changed. However, cross-session stale state on disk can poison this detection.
27
+
28
+ **Solutions:**
29
+ - Pass `force: true` to `browser_map` to force a rebuild
30
+ - Navigate to a new page (which clears the URL-specific skip lock)
31
+ - Clear the cache: `weavetab reset` to clear all session state
32
+
33
+ **Example:**
34
+ ```typescript
35
+ browser_map({ force: true })
36
+ ```
37
+
38
+ ---
39
+
40
+ ### 2. `browser_fill` reports "0 succeeded" but the fields actually changed
41
+
42
+ **Symptom:** The tool fills the form perfectly, but the MCP tool response says the fields failed to apply.
43
+
44
+ **Cause:** (Fixed in v2.5.1+) Previously, verification was backwards. If you see this in older versions, upgrade to the latest version.
45
+
46
+ **Solution:** None needed on v2.5.1+. The verification logic correctly compares pre-mutation and post-mutation state.
47
+
48
+ ---
49
+
50
+ ### 3. `browser_type` appends text instead of replacing it
51
+
52
+ **Symptom:** When trying to type "NEW VALUE" into a field containing "Jane", the field becomes "JaneNEW VALUE".
53
+
54
+ **Cause:** The auto-clear logic relies on keyboard shortcuts (Ctrl+A, Delete) which can fail if the element loses focus during the split-second execution.
55
+
56
+ **Solution:** (Fixed in v2.5.1+) Auto-clear now uses atomic JavaScript evaluation to clear fields securely before typing. For older versions, use `clearFirst: true` parameter.
57
+
58
+ **Example:**
59
+ ```typescript
60
+ browser_type({ id: "w:1", text: "NEW VALUE", clearFirst: true })
61
+ ```
62
+
63
+ ---
64
+
65
+ ### 4. `browser_select` reports success but the value immediately reverts
66
+
67
+ **Symptom:** The dropdown changes, but immediately snaps back to the old value, yet the tool reports `success: true`.
68
+
69
+ **Cause:** Frameworks like React and Vue control form state asynchronously. If Weavetab checks too quickly, it sees the changed DOM before React overrides it.
70
+
71
+ **Solution:** The tool now implements a 400ms multi-pass verification window for dropdowns to detect asynchronous reversion. If the issue persists, try using `browser_fill` with a small delay.
72
+
73
+ ---
74
+
75
+ ### 5. `browser_click` by label takes 50+ seconds
76
+
77
+ **Symptom:** `browser_click({ label: "Submit" })` works, but the command hangs for nearly a minute before returning.
78
+
79
+ **Cause:** Clicking by label requires a full DOM scan. If the click triggers a navigation, older versions would synchronously rebuild the heavy DOM map of the *new* page before returning.
80
+
81
+ **Solutions:**
82
+ - **Best Practice:** Always use `ref` IDs (`w:42`) from `browser_map` rather than text labels
83
+ - **Fixed in v2.5.1+:** Label clicks now use an LRU cache, and post-navigation DOM mapping is deferred
84
+
85
+ **Example:**
86
+ ```typescript
87
+ // Get fresh refs
88
+ const map = await browser_map()
89
+ // Use ref instead of label
90
+ browser_click({ id: "w:42" })
91
+ ```
92
+
93
+ ---
94
+
95
+ ### 6. `browser_inspect` returns `null` for boxModel or styles
96
+
97
+ **Symptom:** Inspecting an element returns `null` for its box model, preventing layout debugging.
98
+
99
+ **Cause:** The CDP query fired before the browser finished painting the layout.
100
+
101
+ **Solution:** The tool now automatically waits 100ms for layout settling and retries up to 3 times. If the issue persists, manually add a small delay before inspection.
102
+
103
+ ---
104
+
105
+ ### 7. `stuck_warning` fires but the page clearly changed
106
+
107
+ **Symptom:** The tool reports `stuck_warning: true`, but the visual page or text labels visibly changed.
108
+
109
+ **Cause:** The warning previously relied on strict text matching.
110
+
111
+ **Solution:** `stuck_warning` now respects the underlying `delta` computation. If the DOM changed, the warning will not fire. If you still see false positives, use `browser_map({ force: true })` or `browser_wait({ reset_loop: true })` to manually reset.
112
+
113
+ ---
114
+
115
+ ### 8. Extension not loading in headless mode
116
+
117
+ **Symptom:** The Weavetab extension features (HUD, Voice UI, etc.) don't appear in headless mode.
118
+
119
+ **Cause:** Chrome extensions don't load in headless mode by default.
120
+
121
+ **Solution:** Use headed mode (`headless: false` in config) or use the `--headless=new` Chrome flag which supports some extension features.
122
+
123
+ ### 9. `browser_tabs(action: "open")` fails with "Not supported" in an Electron app
124
+
125
+ **Symptom:** Opening a URL returns a bare `Not supported` error while attached to a desktop app (Discord, Slack, VS Code, Antigravity, …).
126
+
127
+ **Cause:** Electron does not implement the CDP `Target.createTarget` command, so a brand-new tab/window cannot be created inside a desktop app from the outside. Older builds surfaced the raw CDP message, and a plain `open` (without `app`) could also auto-route to a sticky Electron app instead of the browser.
128
+
129
+ **Solution:** Use `browser_navigate({ app: "<name>", url: "..." })` to load the URL in the app's existing window. To target the web browser instead, run `browser_navigate` first (or pass `app: "browser"`); a plain `browser_tabs(action: "open")` now targets the browser whenever a browser session is active. See `docs/desktop-automation/electron-apps.md` §8.
130
+
131
+ ---
132
+
133
+ ## Configuration Issues
134
+
135
+ ### 1. Domain blacklist not working
136
+
137
+ **Symptom:** Weavetab allows navigation to blacklisted domains.
138
+
139
+ **Cause:** Domain blacklist configuration may not be loaded correctly.
140
+
141
+ **Solution:**
142
+ - Verify `~/.weavetab/config.json` exists and its top-level `policies` array is valid
143
+ - Check that the domain pattern matches (wildcards use `*` not regex)
144
+ - Restart Weavetab after modifying `config.json`
145
+
146
+ **Example `policies` array in config.json:**
147
+ ```json
148
+ {
149
+ "policies": [
150
+ {
151
+ "pattern": "*.banking.com",
152
+ "mode": "deny"
153
+ }
154
+ ]
155
+ }
156
+ ```
157
+
158
+ ---
159
+
160
+ ### 2. RBAC permissions not enforced
161
+
162
+ **Symptom:** Restricted roles can access tools they shouldn't.
163
+
164
+ **Cause:** Role configuration may not be set correctly.
165
+
166
+ **Solution:**
167
+ - Verify `role` is set in `~/.weavetab/config.json`
168
+ - Check that the role is one of: `admin`, `system`, `viewer`, `automation`
169
+ - Restart Weavetab after changing roles
170
+
171
+ ---
172
+
173
+ ### 3. Secrets not being injected
174
+
175
+ **Symptom:** `browser_type_secret` fails to find the secret.
176
+
177
+ **Cause:** Secrets file may not exist or key may be misconfigured.
178
+
179
+ **Solution:**
180
+ - Verify `~/.weavetab/secrets.json` exists
181
+ - Check that the key matches exactly (case-sensitive)
182
+ - For project-scoped secrets, verify `./.weavetab/secrets.json` exists
183
+ - Use `weavetab secrets list` to verify keys are registered
184
+
185
+ ---
186
+
187
+ ## Browser Connection Issues
188
+
189
+ ### 1. "CDP connection failed" error
190
+
191
+ **Symptom:** Weavetab cannot connect to Chrome.
192
+
193
+ **Cause:** Chrome may not be running with remote debugging enabled, or another process is using the CDP port.
194
+
195
+ **Solution:**
196
+ - Start Chrome with remote debugging: Check if Chrome is running and listening on the expected port
197
+ - Check if another Weavetab instance is running and bound to the port
198
+ - Check Weavetab logs for port conflicts and restart
199
+ - Verify port 9222 is not in use: `netstat -an | grep 9222` (Linux/macOS) or `netstat -an | findstr 9222` (Windows)
200
+
201
+ ---
202
+
203
+ ### 2. Browser crashes on startup
204
+
205
+ **Symptom:** Chrome crashes immediately when Weavetab tries to connect.
206
+
207
+ **Cause:** Extension incompatibility or corrupted Chrome profile.
208
+
209
+ **Solution:**
210
+ - Try running without extension: Set `"extension": false` in config
211
+ - Use a fresh Chrome profile: Set `profileDir` to a new directory
212
+ - Check Chrome version compatibility (requires Chrome 90+)
213
+ - Disable hardware acceleration in Chrome settings
214
+
215
+ ---
216
+
217
+ ### 3. Multiple browser instances conflict
218
+
219
+ **Symptom:** Weavetab connects to wrong Chrome instance or fails to connect.
220
+
221
+ **Cause:** Multiple Chrome instances with remote debugging enabled.
222
+
223
+ **Solution:**
224
+ - Use different CDP ports for each instance
225
+ - Specify port in Weavetab config: `cdpPort: 9223`
226
+ - Close other Chrome instances before starting Weavetab
227
+
228
+ ---
229
+
230
+ ## Performance Issues
231
+
232
+ ### 1. High memory usage
233
+
234
+ **Symptom:** Weavetab process consuming excessive memory (>500MB).
235
+
236
+ **Cause:** Large DOM caches or memory leaks in long-running sessions.
237
+
238
+ **Solution:**
239
+ - Clear cache: `weavetab reset`
240
+ - Reduce `maxActionsPerMinute` to slow down execution
241
+ - Enable `prune: true` in `browser_map` to reduce cache size
242
+ - Restart Weavetab periodically for long-running sessions
243
+
244
+ ---
245
+
246
+ ### 2. Slow tool execution
247
+
248
+ **Symptom:** Tools taking longer than expected (>100ms).
249
+
250
+ **Cause:** Network latency, large DOM trees, or slow CDP responses.
251
+
252
+ **Solution:**
253
+ - Use `delta: true` in `browser_map` to avoid full DOM walks
254
+ - Enable `prune: true` to reduce DOM size
255
+ - Use `fast: true` in click operations for faster execution
256
+ - Check network connection and Chrome performance
257
+
258
+ ---
259
+
260
+ ### 3. Token usage too high
261
+
262
+ **Symptom:** LLM context filling up quickly with DOM data.
263
+
264
+ **Cause:** Full DOM maps on every read.
265
+
266
+ **Solution:**
267
+ - Use `browser_map({ delta: true, prune: true })` for maximum efficiency
268
+ - Use `browser_find` instead of `browser_map` for text searches
269
+ - Use `browser_scrape` for targeted data extraction
270
+ - Reduce `limit` parameter in `browser_map` for smaller results
271
+
272
+ ---
273
+
274
+ ## Security Issues
275
+
276
+ ### 1. Secrets appearing in logs
277
+
278
+ **Symptom:** Sensitive data visible in audit logs.
279
+
280
+ **Cause:** Using `browser_type` instead of `browser_type_secret`.
281
+
282
+ **Solution:**
283
+ - Always use `browser_type_secret` for credentials
284
+ - Verify secrets are properly masked in logs as `[REDACTED]`
285
+ - Check that `secrets.json` has correct permissions (`chmod 600`)
286
+
287
+ ---
288
+
289
+ ### 2. Domain policy not blocking sensitive sites
290
+
291
+ **Symptom:** Can navigate to domains that should be blocked.
292
+
293
+ **Cause:** Policy not configured or pattern doesn't match.
294
+
295
+ **Solution:**
296
+ - Verify the top-level `policies` array syntax and patterns in `config.json`
297
+ - Use `*.domain.com` pattern for subdomain matching
298
+ - Restart Weavetab after policy changes
299
+ - Check audit logs to see if policy is being evaluated
300
+
301
+ ---
302
+
303
+ ## Debugging Tips
304
+
305
+ ### Enable DevMode
306
+
307
+ Set `devMode: true` in `~/.weavetab/config.json` to see:
308
+
309
+ - Real-time tool execution timing
310
+ - Token usage estimates
311
+ - Detailed error messages
312
+ - HUD overlay in browser
313
+
314
+ ### Check Audit Logs
315
+
316
+ Review the latest `~/.weavetab-system/logs/mission_<timestamp>.log` for:
317
+
318
+ - Tool invocation history
319
+ - Error messages and stack traces
320
+ - Domain policy violations
321
+ - Security events
322
+
323
+ ### Use Verbose Logging
324
+
325
+ Set environment variable for verbose output:
326
+
327
+ ```bash
328
+ DEBUG=weavetab:* Weavetab
329
+ ```
330
+
331
+ ### Manual Browser Inspection
332
+
333
+ Connect to Chrome DevTools directly:
334
+
335
+ 1. Start Chrome with remote debugging
336
+ 2. Navigate to `chrome://inspect`
337
+ 3. Click "inspect" on the target page
338
+ 4. Use DevTools to manually inspect DOM and network
339
+
340
+
341
+
342
+ ## General Fallbacks
343
+
344
+ If a tool fails:
345
+
346
+ 1. **Always use `browser_map`** to get fresh `ref` IDs (`w:NN`) after navigation or dynamic changes
347
+ 2. If `browser_click` by `ref` fails because the element is occluded or unstable, fall back to `browser_click` with raw `x/y` coordinates
348
+ 3. If an element is hidden inside a shadow DOM, pass `ax_tree: true` to `browser_map` to bypass the standard DOM walker and read the raw accessibility tree
349
+ 4. If typing fails, try `paste: true` mode or use `browser_eval` to set the value directly
350
+ 5. If navigation hangs, try `force: true` or check for blocking dialogs with `browser_dialog`
351
+
352
+ ---
353
+
354
+ ## Getting Help
355
+
356
+ If you continue to experience issues:
357
+
358
+ 1. **Check the logs** — Review `~/.weavetab-system/logs/` for detailed error information
359
+ 2. **Search GitHub Issues** — Check if your issue has already been reported
360
+ 3. **Create a minimal reproduction** — Provide steps to reproduce the issue
361
+ 4. **Include environment details** — OS, Node version, Chrome version, Weavetab version
362
+ 5. **Report via GitHub** — Open an issue with all relevant information
363
+
364
+ **For security issues**, please follow the reporting process in [SECURITY.md](SECURITY.md).
365
+
366
+ ---
367
+
368
+ ## Additional Resources
369
+
370
+ - [Architecture Documentation](ARCHITECTURE.md)
371
+ - [Tool Reference](docs/tools/tools.md)
372
+ - [Security Policy](SECURITY.md)
373
+ - [Contributing Guidelines](CONTRIBUTING.md)