Skip to content

Commit ea605eb

Browse files
Fix Percy/Puppeteer sandbox error in GitHub Actions
Added --no-sandbox and --disable-setuid-sandbox flags to Puppeteer launch options to fix the browser launch failure in GitHub Actions. The error was caused by Ubuntu 23.10+ disabling unprivileged user namespaces with AppArmor, preventing Chromium's sandbox from working in containerized CI environments. These flags are standard practice for running headless Chrome in CI/CD pipelines and are recommended by the Puppeteer troubleshooting guide.
1 parent c312122 commit ea605eb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/web/test/snapshot.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ async function main(args) {
5555
.listen(8080);
5656

5757
// launch puppeteer
58-
const browser = await launch();
58+
const browser = await launch({
59+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
60+
});
5961
const page = await browser.newPage();
6062

6163
// wait for a marker to appear

0 commit comments

Comments
 (0)