microsoft/playwright · error · Error
Failed to connect to MCP relay: ${error.message}
Error message
Failed to connect to MCP relay: ${error.message} What it means
Error "Failed to connect to MCP relay: ${error.message}" thrown in microsoft/playwright.
Source
Thrown at packages/extension/src/pendingConnection.ts:53
return undefined;
this._map.delete(selectorTabId);
return openRelayConnection(mcpRelayUrl);
}
}
async function openRelayConnection(mcpRelayUrl: string): Promise<RelayConnection> {
try {
const socket = new WebSocket(mcpRelayUrl);
await new Promise<void>((resolve, reject) => {
socket.onopen = () => resolve();
socket.onerror = () => reject(new Error('WebSocket error'));
setTimeout(() => reject(new Error('Connection timeout')), 5000);
});
return new RelayConnection(socket);
} catch (error: any) {
const message = `Failed to connect to MCP relay: ${error.message}`;
debugLog(message);
throw new Error(message);
}
}
View on GitHub (pinned to c8fc3bf8d3)
When it happens
Trigger: Thrown at packages/extension/src/pendingConnection.ts:53 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12).
Data as JSON: /api/errors/180299c7ba63b16f.
Report an issue: GitHub.