From 39a006945106939e146ffb3666301605b987dc2a Mon Sep 17 00:00:00 2001 From: Maxxxel Date: Sat, 25 Sep 2021 19:25:12 +0200 Subject: [PATCH] Fix for Raspberry Pi Source: https://sc-consulting.medium.com/puppeteer-on-raspbian-nodejs-3425ccea470e --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 3773f5e..1a59bce 100644 --- a/index.js +++ b/index.js @@ -135,6 +135,7 @@ async function createBrowsers(count, headless) { for (let i = 0; i < count; i++) { const browser = await puppeteer.launch({ headless: headless, + executablePath: '/usr/bin/chromium-browser', args: process.env.CHROME_NO_SANDBOX === 'true' ? ["--no-sandbox"] : ['--disable-web-security', '--disable-features=IsolateOrigins', ' --disable-site-isolation-trials'], @@ -632,4 +633,4 @@ const sleepingTime = sleepingTimeInMinutes * 60000; console.log('Routine error at: ', new Date().toLocaleString(), e) } -})(); \ No newline at end of file +})();