From 8b6a74033c2838a6921c56990e13eedfbc8a559a Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sun, 29 Sep 2024 23:39:28 +0800 Subject: [PATCH] refactor: add no sandbox args in puppeteer --- src/server/utils/screenshot/lighthouse.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/utils/screenshot/lighthouse.ts b/src/server/utils/screenshot/lighthouse.ts index f633222..4ee4842 100644 --- a/src/server/utils/screenshot/lighthouse.ts +++ b/src/server/utils/screenshot/lighthouse.ts @@ -8,6 +8,7 @@ export async function generateLighthouse(url: string): Promise { const browser = await puppeteer.launch({ // Set to false if you want to see the script in action. headless: 'new', + args: ['--no-sandbox'], defaultViewport: null, ignoreDefaultArgs: ['--enable-automation'], });