From 90ec6c2fcdac46bf534fe37cf4a6526af299a877 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'], });