browser_wait_for_selector times out with MCP error -32000
Resolved 💬 1 comment Opened Jan 10, 2026 by trungnguyenvn Closed Jan 10, 2026
Bug Description
The browser_wait_for_selector MCP tool returns a generic timeout error that lacks useful debugging information.
Steps to Reproduce
- Use the
browser_wait_for_selectortool with these parameters:
selector:.source-item:not(.loading)timeout: 30000state:visible
- Wait for the operation to complete
Error Message
MCP error -32000: Tool failed: Request timeout
Expected Behavior
The tool should either:
- Successfully wait for the selector and return when found
- Return a proper timeout error with useful debugging information if the element is not found within the timeout period, such as:
- Whether the element was never found
- Whether the MCP connection itself timed out
- Whether there was a browser/page issue
- Current page URL and state
Actual Behavior
Returns generic MCP error -32000 with "Tool failed: Request timeout" which doesn't indicate the root cause of the failure.
Context
This occurred while trying to wait for a source item element to become visible in NotebookLM after uploading a file.
Impact
- Difficult to debug whether the issue is with the selector, the page state, or the MCP connection
- No way to distinguish between different failure modes
- Makes automated workflows harder to troubleshoot
Suggested Improvements
- Include the selector that was being waited for in the error message
- Include the current page URL
- Distinguish between "element not found" vs "MCP connection timeout"
- Optionally include a snapshot of available elements matching partial selector
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗