mastra-ai/mastra · error
Timeout resolving WebSocket URL from ${versionUrl} (10s)
Error message
Timeout resolving WebSocket URL from ${versionUrl} (10s) What it means
resolveCdpWebSocketUrl enforces a 10-second timeout on the CDP version fetch using AbortController. When fetch aborts (AbortError), the library rethrows it as this clearer timeout error. It means the CDP endpoint did not respond within 10 seconds.
Source
Thrown at browser/firecrawl/src/resolve-cdp.ts:39
try {
const response = await fetch(versionUrl, { signal: controller.signal });
if (!response.ok) {
throw new Error(
`Failed to fetch CDP version info from ${versionUrl}: ${response.status} ${response.statusText}`,
);
}
const data = (await response.json()) as { webSocketDebuggerUrl?: string };
if (!data.webSocketDebuggerUrl) {
throw new Error(`No webSocketDebuggerUrl found in CDP version response from ${versionUrl}`);
}
logger?.debug?.(`Resolved WebSocket URL: ${data.webSocketDebuggerUrl}`);
return data.webSocketDebuggerUrl;
} catch (error) {
if (error instanceof Error && error.name === 'AbortError') {
throw new Error(`Timeout resolving WebSocket URL from ${versionUrl} (10s)`);
}
throw error;
} finally {
clearTimeout(timeoutId);
}
}
return url;
}
View on GitHub (pinned to 75dd419e61)
Solutions
- Check network reachability of the versionUrl host/port (curl the URL)
- Retry — transient latency or service slowness may resolve
- Verify no firewall, VPN, or proxy is blocking the CDP endpoint
- Check Firecrawl service status / recreate the browser session
Defensive patterns
Strategy: retry
Validate before calling
const ctrl = new AbortController();
const t = setTimeout(() => ctrl.abort(), 5000);
try { await fetch(versionUrl, { signal: ctrl.signal }); console.log('CDP reachable'); }
catch { console.error('CDP endpoint unreachable within 5s'); }
finally { clearTimeout(t); } Try / catch
try {
const browser = new FirecrawlBrowser(config);
} catch (e) {
if (e instanceof Error && e.message.includes('Timeout resolving WebSocket URL')) {
// bounded retry with backoff
await retryWithBackoff(() => new FirecrawlBrowser(config), 3);
} else throw e;
} Prevention
- Pre-flight the versionUrl with curl to confirm network reachability
- Check firewall/VPN/proxy rules for the CDP host and port
- Set alerts on Firecrawl service status if running in production
- Fail fast with a clear startup error rather than hanging
When it happens
Trigger: Constructor or wsUrl call where the HTTP request to versionUrl hangs longer than 10 seconds — network black hole, unreachable host, TLS handshake stall, or overloaded remote browser service.
Common situations: Firewall/security group blocking the CDP port; DNS resolving but connection never completing; remote browser service outage; slow VPN or corporate proxy.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Failed to fetch CDP version info from ${versionUrl}: ${respo
- No webSocketDebuggerUrl found in CDP version response from $
- Timeout resolving WebSocket URL from ${versionUrl} (10s)
- No browser context available for screencast
- CDP session not available for mouse injection
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/4c01cc366b74e9c1.
Report an issue: GitHub.