From dfbb553ea5f0d0972f2561e41b2a440b1661ff16 Mon Sep 17 00:00:00 2001 From: Dan Phiffer Date: Fri, 26 Apr 2024 11:03:43 -0400 Subject: [PATCH] be explicit about options.args --- src/collector.ts | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/collector.ts b/src/collector.ts index 4d96e7a..9e1b2d7 100644 --- a/src/collector.ts +++ b/src/collector.ts @@ -107,7 +107,41 @@ export const collect = async (inUrl: string, args: CollectorOptions) => { const options = { ...defaultPuppeteerBrowserOptions, - args: [...defaultPuppeteerBrowserOptions.args, ...args.extraChromiumArgs], + // args: [...defaultPuppeteerBrowserOptions.args, ...args.extraChromiumArgs], + args: [ + '--no-sandbox', + '--disable-dev-shm-usage', + '--ignore-certificate-errors', + '--autoplay-policy=no-user-gesture-required', + '--allow-running-insecure-content', + '--autoplay-policy=user-gesture-required', + '--disable-background-timer-throttling', + '--disable-component-update', + '--disable-domain-reliability', + '--disable-features=AudioServiceOutOfProcess,IsolateOrigins,site-per-process', + '--disable-ipc-flooding-protection', + '--disable-print-preview', + '--disable-dev-shm-usage', + '--disable-setuid-sandbox', + '--disable-site-isolation-trials', + '--disable-speech-api', + '--disable-web-security', + '--disk-cache-size=33554432', + '--enable-features=SharedArrayBuffer', + '--hide-scrollbars', + '--ignore-gpu-blocklist', + '--in-process-gpu', + '--mute-audio', + '--no-default-browser-check', + '--no-first-run', + '--no-pings', + '--no-sandbox', + '--no-zygote', + '--use-gl=angle', + '--use-angle=swiftshader', + '--window-size=1920,1080', + // '--single-process' + ], headless: args.headless, userDataDir };