Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 5: Karma Unit testing fails to start HeadlessChrome on CI environment

We're facing issues on our CI environment (Jenkins within a Docker build pod on Openshift).

Error: Failed to adjust OOM score of renderer with pid 261: Permission denied (13)

Here some additionalinfos:

  • Docker based build pod is running based on CentOS
  • CustomLauncher created with --no-sandbox flag (see below)
  • We are not able to run the pod as a root
  • The error occurs intermittent. But most of the time it fails. Like in one of 10 jobs it works.
  • If we execute the tests locally, everything works fine.

Versions:

  • Angular version 5.1.0
  • Karma-chrome-launcher 2.1.1
  • Karma 1.70

[31m22 01 2018 13:05:37.019:ERROR [launcher]: [39mChrome stdout: [31m22 01 2018 13:05:37.019:ERROR [launcher]: [39mChrome stderr: DevTools listening on ws://127.0.0.1:9222/devtools/browser/c45b2629-938e-490e-a8af-706302677ea4 [0122/130522.747519:ERROR:zygote_host_impl_linux.cc(268)] Failed to adjust OOM score of renderer with pid 261: Permission denied (13) [0122/130533.563149:INFO:CONSOLE(8743)] "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.", source: http://localhost:9876/_karma_webpack_/polyfills.bundle.js (8743) [0122/130533.563271:ERROR:service_manager.cc(157)] Connection InterfaceProviderSpec prevented service: content_renderer from binding interface: blink::mojom::ReportingServiceProxy exposed by: content_browser

Karma.conf customLaunchers: { ChromeHeadlessNoSandbox: { base: 'ChromeHeadless', flags: [ '--no-sandbox', '--disable-setuid-sandbox', '--remote-debugging-port=9222', '--disable-gpu' ] } }

like image 955
Weso Avatar asked Jan 27 '26 12:01

Weso


1 Answers

After we increased the memory of our build pod from 1GB to 2GB everything runs smooth now ....

like image 112
Weso Avatar answered Jan 29 '26 01:01

Weso



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!