From ff5a9e1a768194112419afc1701d04df1e0634df Mon Sep 17 00:00:00 2001 From: Paul Hanneforth Date: Mon, 14 Jun 2021 22:39:12 +0200 Subject: [PATCH] added args to browser --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 94775a8..27295ec 100644 --- a/index.js +++ b/index.js @@ -78,7 +78,8 @@ class InstagramBot { * @returns {Promise} */ static async launch(headless = false, session = {}) { - const browser = await misc.launchBrowser({ headless }); + const args = ["--no-sandbox", "--disable-setuid-sandbox"]; + const browser = await misc.launchBrowser({ headless, args }); const cookies = session.cookies ? session.cookies : []; const page = await misc.newPage(browser, "en", cookies);