setup-chrome
setup-chrome copied to clipboard
Error on ubuntu 20.04
Hey team, we're using this action on self-hosted runners using an image derived from ubuntu 20.04 and got this error:
Run browser-actions/setup-chrome@latest
with:
chrome-version: latest
Setup chromium latest
Attempting to download latest...
(...)
Successfully Installed chromium to /opt/hostedtoolcache/chromium/latest/x64
Successfully installed chromium to /opt/hostedtoolcache/chromium/latest/x64/chrome
Successfully setup chromium version latest
/opt/hostedtoolcache/chromium/latest/x64/chrome --version
/opt/hostedtoolcache/chromium/latest/x64/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
Error: The process '/opt/hostedtoolcache/chromium/latest/x64/chrome' failed with exit code 127
Did I miss a dependency ?
Thanks
Same here!
Running in self hosted
Got around this with the following workaround on my self hosted runner (grabbed the list from here https://stackoverflow.com/questions/58134793/error-while-loading-shared-libraries-libnss3-so-while-running-gtlab-ci-job-to):
- run: |
sudo apt-get update
sudo apt-get install -y libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2
- uses: browser-actions/setup-chrome@latest
Before:
After:
This is also an issue when using ACT, it uses docker runner based in ubuntu that doesn't have those libraries, I think this action should take care of missing libraries.
I have the same issue on self hosted runner based on ubuntu 20.04, thank you for the workaround!
Did anyone already try this on ubuntu 22.04 runners?
The setup-chrome v1.6.0 now supports a new parameter install-dependencies
. It will install required packages automatically in Linux. You can enable this feature like this:
- uses: browser-actions/setup-chrome@v1
with:
chrome-version: 120
install-dependencies: true
Thank you for your reporting, and I'm closing this issue.
Hi @ueokande, thanks for delivery of install-dependencies
feature. However, we are still getting Permission denied when apt-get update and this is caused by missing sudo options.
https://github.com/browser-actions/setup-chrome/pull/521/files#r1597971043