From 73bb185c128f48fe76b5524de56c8e985542485d Mon Sep 17 00:00:00 2001 From: Lluis Date: Fri, 12 Apr 2024 15:19:34 +0200 Subject: [PATCH] add chrome path --- helpers/browserApi.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/browserApi.js b/helpers/browserApi.js index ba5a214..c4cff8a 100644 --- a/helpers/browserApi.js +++ b/helpers/browserApi.js @@ -8,10 +8,10 @@ class PuppeteerApi { async createNewBrowser() { const launchArgs = JSON.stringify({ - args: ["--no-sandbox", "--window-size=1920,1080", "--disable-infobars", "--disable-setuid-sandbox", "--start-maximized"], + args: ["--no-sandbox", "--window-size=1920,1080", "--disable-infobars", "--disable-setuid-sandbox", "--start-maximized", "--use-gl=angle", "--use-angle=gl"], }); - //"--use-gl=angle", "--use-angle=gl" - const url = `${config.browserless.url}?token=${config.browserless.token}&launch=${btoa(launchArgs)}&blockAds=true` + // + const url = `${config.browserless.url}/chrome?token=${config.browserless.token}&launch=${btoa(launchArgs)}&blockAds=true` this.browser = await puppeteer.connect({ browserWSEndpoint: url, defaultViewport : null }) this.browser.on('disconnected', async () => { console.log('disconnected browser')