From 1e1e48d0a375a9f22fe03b92a9b8bc0a0819a872 Mon Sep 17 00:00:00 2001 From: canove Date: Sat, 7 Nov 2020 17:17:58 -0300 Subject: [PATCH] chore: added default args to puppeteer --- backend/src/libs/wbot.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/backend/src/libs/wbot.ts b/backend/src/libs/wbot.ts index 6ab64df..8538ee5 100644 --- a/backend/src/libs/wbot.ts +++ b/backend/src/libs/wbot.ts @@ -22,7 +22,21 @@ export const initWbot = async (whatsapp: Whatsapp): Promise => { } const wbot: Session = new Client({ - session: sessionCfg + session: sessionCfg, + puppeteer: { + headless: true, + executablePath: process.env.CHROME_BIN || null, + args: [ + "--no-sandbox", + "--disable-setuid-sandbox", + "--disable-dev-shm-usage", + "--disable-accelerated-2d-canvas", + "--no-first-run", + "--no-zygote", + "--process-per-site", + "--disable-gpu" + ] + } }); wbot.initialize();