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.

Puppeteer runs locally, but not on Jenkins

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 0.13.0
  • Platform / OS version: 10.12.6
  • URLs (if applicable):
  • Node.js version: 8.9.0

What steps will reproduce the problem?

I am attempting to run e2e test using Puppeteer & Chromium for my Angular 5 project. The script runs locally as expected, but when I run the Jenkins job the applications installs all of the dependencies and builds successfully, but when I tries to run the Chrome executable (after Puppeteer downloads Chromium) it errors out:

Error: Failed to launch chrome!
/.../node_modules/puppeteer/
.local-chromium/linux-515411/chrome-linux/chrome: 
error while loading shared libraries: 
libXss.so.1: cannot open shared object file: No such file or directory

I did some research and some people suggest installing a package called libXScrnSaver, but when I try to npm install libXScrnSaver no such package exists. I suppose this is an issue with the Jenkins vm but I need a way to include all of the dependencies Chromium handless requires to run.

I am not sure what the correct approach is…

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

29reactions
katp4commented, Jan 19, 2018

They are not npm packages, they are system packages so you need every single one of them 100%. This is how i install them in my Dockerfile.

sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

and that’s assuming you are running Debian

0reactions
quachvietcuong-laravel-phpcommented, Jul 27, 2021

@IdanAdar IdanAdar how can u install it, could u teach me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Codeceptjs/Puppeteer test fails ONLY on Jenkins
Show activity on this post. I have a Codeceptjs/Puppeteer test that runs locally on containers orchestrated by Kubernetes and using data coming ...
Read more >
Why tests pass locally but fail in Jenkins | Object Partners
Symptom: Tests pass locally when run in a certain order, but fail in Jenkins when run in a different order (or tests pass/fail...
Read more >
Running Headless Chrome with Puppeteer and Docker
In this post, I'd like to introduce my take on a quick dockerized Puppeteer development environment, to work with the Headless Chrome Node...
Read more >
Headless One Page Acceptance Tests(OPA ... - SAP Blogs
A headless browser is required to run OPA tests in a Jenkins pipeline. Puppeteer is a plugin provided by Google and it helps...
Read more >
CI/CD Pipeline for a NodeJS Application with Jenkins - Medium
Create a Node application job ; 2. Source Code Management > Check Git and give Repository URL: ; 3. Build Environment > Provide...
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