nanasess / setup-chromedriver Goto Github PK
View Code? Open in Web Editor NEWChromeDriver for use in GitHub Actions
License: MIT License
ChromeDriver for use in GitHub Actions
License: MIT License
This seems to be a new issue, I haven't recieved this error before.
This is the github actions configuration:
- uses: nanasess/setup-chromedriver@v2
This is the error:
curl: (22) The requested URL returned error: 404
Error: The process '/home/runner/work/_actions/nanasess/setup-chromedriver/v2/lib/setup-chromedriver.sh' failed with exit code 22
I'd like to use this action but hardcoding the version does not sound like a scalable option. Would it make sense to auto-determine the version by default?
CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1)
CHROME_DRIVER_VERSION=$(curl --location --fail --retry 3 http://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION})
Github has decided to transition from Node.js 16 to Node.js 20. Because of this we're getting some deprecation notices such as this one:
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20:
nanasess/setup-chromedriver@v2
.
For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
on:
push:
branches: ['*']
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: nanasess/[email protected]
https://github.com/tsuzu/test-setup-chromedriver/runs/5604411670?check_suite_focus=true
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module './oidc-utils'
Require stack:
- /home/runner/work/_actions/nanasess/setup-chromedriver/v1.0.6/node_modules/@actions/core/lib/core.js
- /home/runner/work/_actions/nanasess/setup-chromedriver/v1.0.6/lib/setup-chromedriver.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:66[7](https://github.com/go-generalize/api_gen/runs/5603867417?check_suite_focus=true#step:4:7):27)
at Module.require (internal/modules/cjs/loader.js:[8](https://github.com/go-generalize/api_gen/runs/5603867417?check_suite_focus=true#step:4:8)87:1[9](https://github.com/go-generalize/api_gen/runs/5603867417?check_suite_focus=true#step:4:9))
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/runner/work/_actions/nanasess/setup-chromedriver/v1.0.6/node_modules/@actions/core/lib/core.js:37:22)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:[10](https://github.com/go-generalize/api_gen/runs/5603867417?check_suite_focus=true#step:4:10)27:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:[14](https://github.com/go-generalize/api_gen/runs/5603867417?check_suite_focus=true#step:4:14))
at Module.require (internal/modules/cjs/loader.js:887:[19](https://github.com/go-generalize/api_gen/runs/5603867417?check_suite_focus=true#step:4:19)) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/runner/work/_actions/nanasess/setup-chromedriver/v1.0.6/node_modules/@actions/core/lib/core.js',
'/home/runner/work/_actions/nanasess/setup-chromedriver/v1.0.6/lib/setup-chromedriver.js'
]
}
Run nanasess/setup-chromedriver@master
##setup chromedriver
Error: Unable to locate executable file: D:\a\_actions\nanasess\setup-chromedriver\master\lib\setup-chromedriver.sh. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.
refs #299
The following PR's are causing problems with chromedriver searches
SeleniumHQ/selenium#13853
I'm getting this error when running on github actions.
Selenium::WebDriver::Error::UnknownError:
unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
.github/workflow/ci.yml
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
rspec:
env:
RAILS_ENV: test
DATABASE_URL: mysql2://root:[email protected]:3306/rails_development
RUBYOPT: -EUTF-8
SELENIUM_CHROME_HEADLESS: true
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: rails_development
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 14
- name: Configure database
run: |
cp config/ci.database.yml config/database.yml
cp config/ci.config.yml config/config.yml
bundle exec rake db:structure:load db:migrate
## - uses: browser-actions/setup-chrome@latest
## with:
## chrome-version: stable
- name: Download chrome driver
uses: nanasess/setup-chromedriver@master
- name: Launch chrome driver
run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: Run Rspec Tests
run: |
bundle exec rspec spec --format progress
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- uses: aki77/delete-pr-comments-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
bodyContains: "[undercover]"
noReply: "true"
- name: Run Undercover via Reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git fetch --no-tags
reviewdog -reporter=github-pr-review -runners=undercover
Make CHROMEAPP an a input variable that can be declared from the GitHub action workflow.
Action Usage
- name: Selenium ChromeDriver - Install
if: ${{ inputs.install_selenium }}
uses: nanasess/[email protected]
id: setup-chromedriver
with:
chromedriver-version: '119.0.6045.105'
Its failing to find google-chrome with the command dpkg -s google-chrome
runner@fd37d0ad3433:/$ dpkg -s google-chrome
dpkg-query: package 'google-chrome' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
runner@fd37d0ad3433:/$ dpkg -s google-chrome-stable
Package: google-chrome-stable
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 326369
Maintainer: Chrome Linux Team <[email protected]>
Architecture: amd64
Version: 119.0.6045.159-1
Provides: www-browser
Depends: ca-certificates, fonts-liberation, libasound2 (>= 1.0.17), libatk-bridge2.0-0 (>= 2.5.3), libatk1.0-0 (>= 2.2.0), libatspi2.0-0 (>= 2.9.90), libc6 (>= 2.17), libcairo2 (>= 1.6.0), libcups2 (>= 1.6.0), libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3, libdbus-1-3 (>= 1.9.14), libdrm2 (>= 2.4.75), libexpat1 (>= 2.1~beta3), libgbm1 (>= 17.1.0~rc2), libglib2.0-0 (>= 2.39.4), libgtk-3-0 (>= 3.9.10) | libgtk-4-1, libnspr4 (>= 2:4.9-2~), libnss3 (>= 2:3.35), libpango-1.0-0 (>= 1.14.0), libu2f-udev, libvulkan1, libx11-6 (>= 2:1.4.99.1), libxcb1 (>= 1.9.2), libxcomposite1 (>= 1:0.4.4-1), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxkbcommon0 (>= 0.5.0), libxrandr2, wget, xdg-utils (>= 1.0.2)
Pre-Depends: dpkg (>= 1.14.0)
Description: The web browser from Google
Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.
runner@fd37d0ad3433:/$
Making this an optional input variable will give the ability to pass in google-chrome-stable as the CHROMEAPP.
Fails with following error:
CHROME_VERSION=119
VERSION=119.0.6045.105
Downloading https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json...
Installing ChromeDriver 119.0.6045.105 for linux64
Downloading https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chromedriver-linux64.zip
https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chromedriver-linux64.zip...
Error: The process '/runner/_work/_actions/nanasess/setup-chromedriver/v2/lib/setup-chromedriver.sh' failed with exit code 3
Action usage:
- name: Set up chromedriver
uses: nanasess/setup-chromedriver@v2
Currently seeing lots of failures when trying to download ChromeDriver 115 on Linux runners
Run nanasess/setup-chromedriver@6fb8f5ffa6b7dc11e631ff695fbd2fec0b04bb52
##setup chromedriver
/home/runner/work/_actions/nanasess/setup-chromedriver/6fb8f5ffa6b7dc11e631ff695fbd2fec0b04bb52/lib/setup-chromedriver.sh linux64
Installing ChromeDriver 115.0.5790.110 for linux64
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 236k 100 236k 0 0 1478k 0 --:--:-- --:--:-- --:--:-- 1481k
Downloading
curl: Remote file name has no length!
curl: (23) Failed writing received data to disk/application
Error: The process '/home/runner/work/_actions/nanasess/setup-chromedriver/6fb8f5ffa6b7dc11e631ff695fbd2fec0b04bb52/lib/setup-chromedriver.sh' failed with exit code 23
Issue when using nanasess/setup-chromedriver@v2
| ##setup chromedriver
| [command]/run/act/actions/nanasess-setup-chromedriver@v2/lib/setup-chromedriver.sh linux64
| dpkg-query: package 'google-chrome' is not installed and no information is available
| Use dpkg --info (= dpkg-deb --info) to examine archive files.
| Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
| Executing: /tmp/apt-key-gpghome.5vFEFduHjd/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys A040830F7FAC5991
| gpg: key A040830F7FAC5991: public key "Google, Inc. Linux Package Signing Key <[email protected]>" imported
| gpg: Total number processed: 1
| gpg: imported: 1
| Installing google-chrome-stable...
| Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
| Get:2 https://dl.google.com/linux/chrome/deb stable InRelease [1825 B]
| Get:3 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease [3631 B]
| Get:4 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy InRelease [23.8 kB]
| Get:5 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
| Err:2 https://dl.google.com/linux/chrome/deb stable InRelease
| The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
Repro:
Any version of nanasess/setup-chromedriver@v2
Proposed fix:
Update A040830F7FAC5991 to 4EB27DB2A3B88B8B in setup-chromedriver.sh
We have our github action set to v1 and just started seeing the following error in workflow logs
Run nanasess/setup-chromedriver@v1
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module './oidc-utils'
Require stack:
Relevant portion of the github workflow
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
cache: yarn
- name: Setup chromium driver for tests
uses: nanasess/setup-chromedriver@v1
Fails with the following error
The chromedriver version (114.0.5735.90) detected in PATH at /usr/local/bin/chromedriver might not be compatible with the detected chrome version (116.0.5845.187); currently, chromedriver 116.0.5845.96 is recommended for chrome 116.*, so it is advised to delete the driver in PATH and retry
refs #230
Since yesterday I'm having this issue in our CI using setup-chromedriver
with Selenium tests:
2023-03-17T06:17:40.2267884Z org.openqa.selenium.remote.http.ConnectionFailedException:
2023-03-17T06:17:40.2268593Z Unable to establish websocket connection to http://localhost:44213/devtools/browser/76d507ce-e5b8-4d92-b766-98f9303c6e73
2023-03-17T06:17:40.2269075Z Build info: version: '4.8.1', revision: '8ebccac989'
2023-03-17T06:17:40.2269561Z System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-1034-azure', java.version: '17.0.6'
2023-03-17T06:17:40.2273938Z Driver info: driver.version: ChromeDriver`
We haven't changed anything to our tests or the Github action configuration, and everything works fine in local. Any idea how to fix this annoying issue, blocking our CI ?
Recently we get the following error from curl:
Run nanasess/setup-chromedriver@v2
with:
env:
pythonLocation: /opt/hostedtoolcache/Python/3.8.17/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.17/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.17/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.17/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.17/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.17/x64/lib
##setup chromedriver
/home/runner/work/_actions/nanasess/setup-chromedriver/v2/lib/setup-chromedriver.sh linux64
Installing ChromeDriver 115.0.5790.110 for linux64
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 232k 100 232k 0 0 2425k 0 --:--:-- --:--:-- --:--:-- 2425k
Downloading
curl: Remote file name has no length!
curl: (23) Failed writing received data to disk/application
Error: The process '/home/runner/work/_actions/nanasess/setup-chromedriver/v2/lib/setup-chromedriver.sh' failed with exit code 23
Were there changes on the download rate limit at Google?
##setup chromedriver
/home/runner/work/_actions/nanasess/setup-chromedriver/v2/lib/setup-chromedriver.sh linux64
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 1[9](https://github.com/diowa/ruby3-rails7-bootstrap-heroku/actions/runs/5664695183/job/15348359218?pr=575#step:4:10)3 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
Error: The process '/home/runner/work/_actions/nanasess/setup-chromedriver/v2/lib/setup-chromedriver.sh' failed with exit code 22
I think that it is because chromedriver 115 has not been uploaded yet
Action usage:
- name: Set up chromedriver
uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: 118.0.5993.70
This still installs Chrome 119 which then causes issues in selenium tests.
Expectation: It should install Chrome 118.
I'm trying to install chromedriver on Github actions, but getting:
Run nanasess/setup-chromedriver@master
with:
chromedriver-version: 88.0.4324.96
/usr/bin/docker exec 09fd831c857ab493aa5bdd18081d4d0f2275269062204f74c4f050c7276a208e sh -c "cat /etc/*release | grep ^ID"
##setup chromedriver
/__w/_actions/nanasess/setup-chromedriver/master/lib/setup-chromedriver.sh 88.0.4324.96 linux64
/__w/_actions/nanasess/setup-chromedriver/master/lib/setup-chromedriver.sh: line 11: sudo: command not found
Error: The process '/__w/_actions/nanasess/setup-chromedriver/master/lib/setup-chromedriver.sh' failed with exit code 127
Our workflow looks like this:
name: Review
on:
pull_request:
jobs:
review:
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: elixir:1.12.1-slim
services:
postgis:
image: mdillon/postgis:11
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST: "/"
steps:
- uses: actions/checkout@v2
- uses: nanasess/setup-chromedriver@master
with:
# Optional: do not specify to match Chrome's version
chromedriver-version: '88.0.4324.96'
I tried without the with: ...
, same result.
Any idea?
Replacing this line with this resolved my issues:
uses: nanasess/setup-chromedriver@master
uses: nanasess/setup-chromedriver@6736cbd7ef5165df33fb4811482a596f943c46c4
Hi,
I have old version of chrome installed and I am trying to install chrome driver for that.
Version - 100.0.4896.75
Chrome driver installation fails with the below error :
Run nanasess/setup-chromedriver@v2
##setup chromedriver
/opt/actions-runner/_work/_actions/nanasess/setup-chromedriver/v2/lib/setup-chromedriver.sh 100.0.4896.75 linux64
dpkg-query: package 'google-chrome' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.0c9q0UXf3c/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys A0XX430F7FAC5991
gpg: keyserver receive failed: Connection timed out
Error: The process '/opt/actions-runner/_work/_actions/nanasess/setup-chromedriver/v2/lib/setup-chromedriver.sh' failed with exit code 2
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Setup ChromeDriver
The chrome was successfully installed but getting this error message while trying to install driver.
Can you please look into this?
Is it possible to use this instance of chromedriver in github actions with a python seleium script? If so, what is the path to the chromedriver?
In order for me to use this action I needed to specify the full version number, like so:
- uses: nanasess/[email protected]
The README indicated that setting the version to v2
should work.
Need to specify the driver path in my automation program
Github Actions suddenly failed due to setup-chromedriver. Maybe this error is related to the recently added codes?
....
- uses: nanasess/setup-chromedriver@master
....
....
Download action repository 'nanasess/setup-chromedriver@master'
Error: Could not find file '/home/runner/work/_actions/temp*******/_staging/nanasess-setup-chromedriver-eb06ff5/node_modules/jest-jasmine2/node_modules/.bin/jest-runtime'.
Run nanasess/setup-chromedriver@master
/usr/bin/docker exec ecfce479f2448e9e04f32d9483aa598c9ddfa34d0c7cf4c35c7520c1a152e61e sh -c "cat /etc/*release | grep ^ID"
Running JavaScript Action with default external tool: node12
##setup chromedriver
/__w/_actions/nanasess/setup-chromedriver/master/lib/setup-chromedriver.sh linux64
/__w/_actions/nanasess/setup-chromedriver/master/lib/setup-chromedriver.sh: line 9: google-chrome: command not found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.