Skip to content

Commit

Permalink
chore(test): adds --no-sandbox to testing to prevent gh hang
Browse files Browse the repository at this point in the history
This follows the suggestion as seen in the  error message on the
ghaction:

   Run npm test
   > [email protected] test
   > node test/server.js
   Failed to launch the browser process!
   [2359:2359:0107/175821.608019:FATAL:zygote_host_impl_linux.cc(126)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
  • Loading branch information
vchendrix committed Jan 7, 2025
1 parent 1c98d96 commit 36f6e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const server = app.listen(port);
url = "http://localhost:" + port + url;

async function runTests(url) {
const browser = await puppeteer.launch({ headless: true });
const browser = await puppeteer.launch({ headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox'] });
const page = await browser.newPage();
await page.goto(url, { waitUntil: "networkidle0" });
const html = await page.content(); // serialized HTML of page DOM.
Expand Down

0 comments on commit 36f6e2c

Please sign in to comment.