From 10466d7c4c1f9bef66b6118e911cadb40c495cc4 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Sat, 10 Jan 2026 12:17:39 -0600 Subject: [PATCH] timeout --- src/browser.ts | 5 +++++ src/client.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/browser.ts b/src/browser.ts index cec0689..6e3f547 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -435,6 +435,10 @@ export class BrowserManager { const context = await this.browser.newContext({ viewport: options.viewport ?? { width: 1280, height: 720 }, }); + + // Set default timeout to 10 seconds (Playwright default is 30s) + context.setDefaultTimeout(10000); + this.contexts.push(context); // Create initial page @@ -470,6 +474,7 @@ export class BrowserManager { const context = await this.browser.newContext({ viewport: viewport ?? { width: 1280, height: 720 }, }); + context.setDefaultTimeout(10000); this.contexts.push(context); const page = await context.newPage(); diff --git a/src/client.ts b/src/client.ts index fc2ec0b..4d7dc67 100644 --- a/src/client.ts +++ b/src/client.ts @@ -128,14 +128,14 @@ export async function sendCommand(command: Record): Promise { if (!resolved) { - debug('Command timeout after 60s'); + debug('Command timeout after 15s'); socket.destroy(); reject(new Error('Command timeout')); } - }, 60000); + }, 15000); }); }