Skip to content

Instantly share code, notes, and snippets.

@abhilashlr
Last active December 5, 2017 04:09
Show Gist options
  • Save abhilashlr/8ad6d2cf6cc03c2f4e0a9c35e4a4e036 to your computer and use it in GitHub Desktop.
Save abhilashlr/8ad6d2cf6cc03c2f4e0a9c35e4a4e036 to your computer and use it in GitHub Desktop.
Chrome headless Linux (Jenkins) - Setup
sudo apt-get update
sudo apt-get install -y libappindicator1 fonts-liberation
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
# Test chrome setup by running in terminal
google-chrome --version # Ensure it is above 59
@zhiy
Copy link

zhiy commented Dec 5, 2017

Hi, I encountered problem when run headless chrome in jenkins job, from verbose log seems:

[1.003][DEBUG]: DevTools request: http://localhost:12142/json/version
mkdir: cannot create directory ‘/.local’: Permission denied
touch: cannot touch ‘/.local/share/applications/mimeapps.list’: No such file or directory
[1.124][DEBUG]: DevTools request failed
[1.174][DEBUG]: DevTools request: http://localhost:12142/json/version
[1.176][DEBUG]: DevTools request failed

fact I can start headless chrome from terminal, but failed in jenkins, do you know how to resolve it?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment