Skip to content

Commit

Permalink
add chrome path
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed Apr 12, 2024
1 parent 17742de commit 73bb185
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpers/browserApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 73bb185

Please sign in to comment.