From f1d769ce6bcec24d0f02f8b522f96082accb2408 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Sat, 17 Dec 2022 00:09:32 -0600 Subject: [PATCH] feat: add useful puppeteer launch args --- src/openai-auth.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/openai-auth.ts b/src/openai-auth.ts index 51ec6f8..413db55 100644 --- a/src/openai-auth.ts +++ b/src/openai-auth.ts @@ -211,7 +211,18 @@ export async function getBrowser( return puppeteer.launch({ headless: false, - args: ['--no-sandbox', '--exclude-switches', 'enable-automation'], + // https://peter.sh/experiments/chromium-command-line-switches/ + args: [ + '--no-sandbox', + '--exclude-switches', + 'enable-automation', + '--disable-infobars', + '--disable-dev-shm-usage', + '--disable-blink-features=AutomationControlled', + '--no-first-run', + '--no-service-autorun', + '--password-store=basic' + ], ignoreHTTPSErrors: true, executablePath, ...launchOptions