Skip to content

Commit

Permalink
fix: random puppeteer crawler (running in headful mode) failure (#1348)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyBykov authored May 3, 2022
1 parent 8090509 commit e2d9233
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- fix: `utils.apifyClient` early instantiation (#1330)
- feat: `utils.playwright.injectJQuery()` (#1337)
- feat: add `keyValueStore` option to `Statistics` class (#1345)
- fix: random puppeteer crawler (running in headful mode) failure (#1348)

2.3.0 / 2022/04/07
====================
Expand Down
6 changes: 6 additions & 0 deletions src/browser_launchers/puppeteer_launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ export class PuppeteerLauncher extends BrowserLauncher {
const launchOptions = super.createLaunchOptions();
launchOptions.args = launchOptions.args || [];

// Adding the following flag should prevent actor run failure for puppeteer crawler running in headful mode.
// Related to https://github.com/puppeteer/puppeteer/issues/7050.
if (!launchOptions.headless) {
launchOptions.args.push('--disable-site-isolation-trials');
}

if (isAtHome()) launchOptions.args.push('--no-sandbox');

if (launchOptions.defaultViewport === undefined) {
Expand Down

0 comments on commit e2d9233

Please sign in to comment.