Skip to content

Commit

Permalink
remove /chrome and gpu launch args
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed Apr 12, 2024
1 parent f9474a2 commit 17742de
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 143 deletions.
5 changes: 3 additions & 2 deletions helpers/browserApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ class PuppeteerApi {

async createNewBrowser() {
const launchArgs = JSON.stringify({
args: ["--no-sandbox", "--window-size=1920,1080", "--disable-infobars", "--disable-setuid-sandbox", "--start-maximized", "--use-gl=angle", "--use-angle=gl"],
args: ["--no-sandbox", "--window-size=1920,1080", "--disable-infobars", "--disable-setuid-sandbox", "--start-maximized"],
});
const url = `${config.browserless.url}/chrome?token=${config.browserless.token}&launch=${btoa(launchArgs)}&blockAds=true`
//"--use-gl=angle", "--use-angle=gl"
const url = `${config.browserless.url}?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
Loading

0 comments on commit 17742de

Please sign in to comment.