question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ChromeHeadless can't run as root with --no-sandbox anymore

See original GitHub issue

After updating to Chrome 62 and Chromedriver 2.33, I get the following error when running karma tests with ChromeHeadless:

  | 25 10 2017 08:47:40.197:ERROR [launcher]: Cannot start ChromeHeadless
  | [1025/084740.006078:ERROR:zygote_host_impl_linux.cc(88)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

This is in Docker running Ubuntu 16

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:44
  • Comments:25

github_iconTop GitHub Comments

346reactions
boboldehampsinkcommented, Oct 25, 2017

Workaround:

    browsers: ['ChromeHeadlessNoSandbox'],
    customLaunchers: {
      ChromeHeadlessNoSandbox: {
        base: 'ChromeHeadless',
        flags: ['--no-sandbox']
      }
    },
115reactions
yuri-wisestampcommented, Jun 13, 2018

If you’re running Puppeteer directly from Node code, you can provide this flag as follows: const browser = await puppeteer.launch({headless: true, args:['--no-sandbox']});

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why should tests of an Angular application use the --no- ...
I'm not sure why the example code disables the sandbox, but for what it's worth, we leave it on in our test suite...
Read more >
How to fix Chrome (--no-sandbox is not supported) error in ...
Answer: To fix the above (Running as root without --no-sandbox is not supported) error, use following steps: step1: Edit the below file.
Read more >
Make Chrome Headless use "--no-sandbox" (configurable)
When running JS tests (usingKarma) with headless chrome in a docker container, the tests fail. To run chrome as root it is required...
Read more >
List of Chromium Command Line Switches
--allow-no-sandbox-job ⊗, Enables the sandboxed processes to run without a job object assigned to them. This flag is required to allow Chrome to...
Read more >
Karma test with ChromeHeadless '--no-sandbox' issue
I'm trying to run Karma tests in Jenkins pipeline. I'm new to this topic, and to start, I pulled openui5-sample-app from Git repository....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found