[go: up one dir, main page]

Page MenuHomePhabricator

Browser process fails to start when running Puppeteer in CI
Closed, ResolvedPublic

Description

I have implemented a simple test for checking admin log in functionality on Puppeteer on Mediawiki core. The relevant patch can be found here.

The test runs fine on my local setup however gives the following error on the CI

22:24:02 > npm run puppeteer:silent
22:24:02 
22:24:03 
22:24:03 > @ puppeteer:silent /workspace/src
22:24:03 > jest -c ./tests/puppeteer/jest.config.js
22:24:03 
22:24:06  FAIL  tests/puppeteer/spuser.spec.js
22:24:06   should be able to log in admin to @daily
22:24:06     ✕ should login admin to @daily (8ms)
22:24:06 
22:24:06   ● should be able to log in admin to @daily › should login admin to @daily
22:24:06 
22:24:06     Failed to launch the browser process!
22:24:06     [0420/165406.085796:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/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.

This is likely an issue with Chromium however I am not an expert at this and am struggling to debug.

To replicate the setup:

  • Run git review -d 584908
  • Get Mediawiki up and running by following the guidelines at DEVELOPERS.md
  • Run npm ci
  • Run npm run puppeteer:silent

You would find the code to run fine locally but the same code gives an error on the CI

OS Version: OSX Mojave
NodeJS: 12.x

Event Timeline

Soham updated the task description. (Show Details)
zeljkofilipin triaged this task as Medium priority.
zeljkofilipin moved this task from Backlog 🪒 to Deep work 🌊 on the User-zeljkofilipin board.

This issue can be resolved using the --no-sandbox flag. I am aware. What I am trying to understand is why doesn't it work without that flag?

In T250727#6072812, @AlQaholic007 wrote:

This issue can be resolved using the --no-sandbox flag. I am aware. What I am trying to understand is why doesn't it work without that flag?

This might be of help...

https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md#setting-up-chrome-linux-sandbox

In T250727#6072812, @AlQaholic007 wrote:

This issue can be resolved using the --no-sandbox flag. I am aware. What I am trying to understand is why doesn't it work without that flag?

This might be of help...

https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md#setting-up-chrome-linux-sandbox

I have already referred this. What I am trying to point out is

If its okay to get away with --no sandbox or should these dependencies be installed on CI?