diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 07a2c43..aad9de0 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -69,7 +69,7 @@ export class AuthService { throw new BadRequestException(`Key file not found: ${descriptor.keyFile}`); } - const browser = await chromium.launch({ headless: true }); + const browser = await chromium.launch({ headless: true, executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH }); try { const context = await browser.newContext(); const page = await context.newPage(); diff --git a/src/browser/browser.service.ts b/src/browser/browser.service.ts index 5a92420..b7d9aec 100644 --- a/src/browser/browser.service.ts +++ b/src/browser/browser.service.ts @@ -44,7 +44,7 @@ export class BrowserService { throw new InternalServerErrorException('Failed to deserialize session data', { cause: err }); } - const browser = await chromium.launch({ headless: true }); + const browser = await chromium.launch({ headless: true, executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH }); try { const context = await browser.newContext(); @@ -112,7 +112,7 @@ export class BrowserService { throw new InternalServerErrorException('Failed to deserialize session data', { cause: err }); } - const browser = await chromium.launch({ headless: true }); + const browser = await chromium.launch({ headless: true, executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH }); try { const context = await browser.newContext(); await context.addCookies(cookies); diff --git a/src/scenario/scenario-scheduler.service.ts b/src/scenario/scenario-scheduler.service.ts index 05bd7d3..22c118f 100644 --- a/src/scenario/scenario-scheduler.service.ts +++ b/src/scenario/scenario-scheduler.service.ts @@ -144,7 +144,7 @@ export class ScenarioSchedulerService { const cookies: unknown[] = JSON.parse(session.cookies); const localStorageData: Record = JSON.parse(session.localStorage); - const browser = await chromium.launch({ headless: true }); + const browser = await chromium.launch({ headless: true, executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH }); try { const context = await browser.newContext(); await context.addCookies(cookies as Parameters[0]);