From b42df484547ed6d2f9621631187a38404963cee5 Mon Sep 17 00:00:00 2001 From: Kshitij Date: Sat, 11 May 2024 15:38:45 +0530 Subject: [PATCH 1/2] Fixed library error for pm2. --- whatsapp-js/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/whatsapp-js/main.js b/whatsapp-js/main.js index 8f0de277..f8c11973 100644 --- a/whatsapp-js/main.js +++ b/whatsapp-js/main.js @@ -35,7 +35,15 @@ const client = new Client({ authStrategy: new LocalAuth(), puppeteer: { headless: true, - args: ["--no-sandbox"], + args: [ + "--no-sandbox", + "--disable-setuid-sandbox", + "--disable-dev-shm-usage", + "--disable-accelerated-2d-canvas", + "--no-first-run", + "--no-zygote", + "--disable-gpu", + ], }, webVersionCache: { type: "remote", From cc520c81956c8430078a775476686b3323654f59 Mon Sep 17 00:00:00 2001 From: Kshitij Date: Mon, 13 May 2024 18:24:10 +0530 Subject: [PATCH 2/2] Changed whatsapp client code. --- whatsapp-js/main.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/whatsapp-js/main.js b/whatsapp-js/main.js index 8f0de277..fd452678 100644 --- a/whatsapp-js/main.js +++ b/whatsapp-js/main.js @@ -32,11 +32,6 @@ app.listen(port, () => { }); const client = new Client({ - authStrategy: new LocalAuth(), - puppeteer: { - headless: true, - args: ["--no-sandbox"], - }, webVersionCache: { type: "remote", remotePath: