Skip to content

Commit

Permalink
Puppeteer: Disable Chrome features that crash GitHubActions.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Apr 27, 2024
1 parent 0b6d302 commit 62a8ca7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/e2e/puppeteer-environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ class PuppeteerEnvironment extends JsDomEnvironment {
// Note: this.global is not global to all test suites; it is sandboxed to a single test module, e.g. caret.ts
this.global.browser = await puppeteer.launch({
headless: true,
// Disable Chrome features that crash GitHub Actions with "Protocol error (Target.createTarget): Target closed."
// See: https://stackoverflow.com/a/66994528/480608
// List of Chromium switches: https://peter.sh/experiments/chromium-command-line-switches/
args: [
'--deterministic-fetch',
'--disable-dev-shm-usage',
'--disable-features=IsolateOrigins',
'--disable-setuid-sandbox',
'--disable-site-isolation-trials',
'--no-first-run',
'--no-sandbox',
'--no-zygote',
],
})
}

Expand Down

0 comments on commit 62a8ca7

Please sign in to comment.