Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest chrome is not supported 115.0.5790.98 #523

Open
jthacker opened this issue Jul 21, 2023 · 13 comments
Open

Latest chrome is not supported 115.0.5790.98 #523

jthacker opened this issue Jul 21, 2023 · 13 comments

Comments

@jthacker
Copy link

Background

As of version 115, chromedriver builds are now stored in a new repository.

Starting with M115 the latest Chrome + ChromeDriver releases per release channel (Stable, Beta, Dev, Canary) are available at the Chrome for Testing availability dashboard. For automated version downloading one can use the convenient JSON endpoints.

Reproducible case

docker run -it node:latest /bin/bash
mkdir /tmp/project && cd /tmp/project
npm install webdriver-manager
npx webdriver-manager update --versions.chrome=115.0.5790.98

Output

npx webdriver-manager update --versions.chrome=115.0.5790.98
webdriver-manager: using local installed version 12.1.9
[00:23:47] I/file_manager - creating folder /tmp/node_modules/webdriver-manager/selenium
[00:23:47] I/config_source - curl -o/tmp/node_modules/webdriver-manager/selenium/standalone-response.xml https://selenium-release.storage.googleapis.com/
[00:23:47] I/config_source - curl -o/tmp/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
[00:23:47] I/config_source - curl -o/tmp/node_modules/webdriver-manager/selenium/gecko-response.json https://api.github.com/repos/mozilla/geckodriver/releases
[00:23:47] E/downloader - options.uri is a required argument
[00:23:47] I/update - chromedriver: file exists /tmp/node_modules/webdriver-manager/selenium/chromedriver_115.0.5790.98.zip
[00:23:47] I/update - chromedriver: unzipping chromedriver_115.0.5790.98.zip
/tmp/node_modules/webdriver-manager/built/lib/cmds/update.js:232
            throw new Error(`Invalid filename: ${path.resolve(outputDir, fileName)}`);
                  ^

Error: Invalid filename: /tmp/node_modules/webdriver-manager/selenium/chromedriver_115.0.5790.98.zip
    at unzip (/tmp/node_modules/webdriver-manager/built/lib/cmds/update.js:232:19)
    at /tmp/node_modules/webdriver-manager/built/lib/cmds/update.js:205:13
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 1)
@StanislavKharchenko
Copy link

@dgp1130 ???

@martinharyanto
Copy link

martinharyanto commented Jul 26, 2023

I think this is also the same with my problem, today I tried to run webdriver-manager on my phyton code for selenium, and this error appear

Traceback (most recent call last):
  File "/Users/martinharyanto/PycharmProjects/pythonProject/main.py", line 61, in <module>
    main()
  File "/Users/martinharyanto/PycharmProjects/pythonProject/main.py", line 21, in main
    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/martinharyanto/PycharmProjects/pythonProject/venv/lib/python3.11/site-packages/webdriver_manager/chrome.py", line 39, in install
    driver_path = self._get_driver_binary_path(self.driver)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/martinharyanto/PycharmProjects/pythonProject/venv/lib/python3.11/site-packages/webdriver_manager/core/manager.py", line 33, in _get_driver_binary_path
    file = self._download_manager.download_file(driver.get_driver_download_url())
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/martinharyanto/PycharmProjects/pythonProject/venv/lib/python3.11/site-packages/webdriver_manager/drivers/chrome.py", line 59, in get_driver_download_url
    modern_version_url = self.get_url_for_version_and_platform(driver_version_to_download, os_type)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/martinharyanto/PycharmProjects/pythonProject/venv/lib/python3.11/site-packages/webdriver_manager/drivers/chrome.py", line 94, in get_url_for_version_and_platform
    raise Exception(f"No such driver version {browser_version} for {platform}")
Exception: No such driver version 115.0.5790.114 for mac-arm64

@mdislam04
Copy link

i am also getting the same issue. is some one looking into it?

$ npx webdriver-manager update --gecko=false --versions.chrome 115.0.5790.102
webdriver-manager: using global installed version 12.1.9
[13:14:29] I/config_source - curl -oC:\Users\mohmmad.islam\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\selenium\standalone-response.xml https://selenium-release.storage.googleapis.com/
[13:14:29] I/config_source - curl -oC:\Users\mohmmad.islam\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
[13:14:30] E/downloader - options.uri is a required argument
[13:14:30] I/update - chromedriver: file exists C:\Users\mohmmad.islam\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\selenium\chromedriver_115.0.5790.102.zip
[13:14:30] I/update - chromedriver: unzipping chromedriver_115.0.5790.102.zip
C:\Users\m\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\built\lib\cmds\update.js:232
throw new Error(Invalid filename: ${path.resolve(outputDir, fileName)});
^

Error: Invalid filename: C:\Users\m\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\selenium\chromedriver_115.0.5790.102.zip
at unzip (C:\Users\m\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\built\lib\cmds\update.js:232:19)
at C:\Users\m\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\built\lib\cmds\update.js:205:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 1)

Node.js v19.8.1

@bboycs
Copy link

bboycs commented Jul 27, 2023

chromedrive changed their endpoint for download the latest chromedriver (115 onwards)

@StanislavKharchenko
Copy link

use "selenium-manager" to download latest chromedriver binaries.

@bboycs
Copy link

bboycs commented Aug 1, 2023

@StanislavKharchenko do you have idea how to match the "selenium-manager" with protractor ?

@StanislavKharchenko
Copy link

@bboycs The simple solution is to prepare short script which will call selenium-manager, download driver binaries and copy it to node-modules/webdriver-manager/downloads folder (to path where these binaries should actually present)

@ParmaJonEman
Copy link

What I did to solve this is just write a postinstall node script to hit the "last-known-good-versions-with-downloads" endpoint , download the correct file, and unzip it. I then added the "chromeDriver" parameter to the protractor config file, so that it points to where I download it, instead of attempting to use webdriver-manager.

@i-C-o-d-e-r
Copy link

Inspired by @StanislavKharchenko and @ParmaJonEman proposals, I use this method as a workaround:

  1. Install the NPM package chromedriver as a dev-dependency in package.json
  2. Amend Protractors config file protractor.conf.js by letting chromeDriver point to the Chrome-Driver executable provided by the NPM package. On Windows this is chromeDriver: './node_modules/chromedriver/lib/chromedriver/chromedriver.exe'

@karan-deep
Copy link

karan-deep commented Aug 24, 2023

For Mac and using NPM webdriver-manager package,

  1. Download same version of chrome-driver as per your browser version. https://googlechromelabs.github.io/chrome-for-testing/
  2. Go to cd /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium.
  3. Copy downloaded chrome-driver to this folder.
  4. Rename downloaded chrome-driver version with your latest selenium chrome driver version. Ex -> downloaded chrome-driver to chromedriver_114.0.5735.90.
  5. After renaming, convert it to zip folder as well.
  6. Allow Anyway it from Security & Privacy.

Now, you would be using latest chrome driver for selenium with your latest browser. You would not see following error "session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.110 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome".

Don't run webdriver-manager update cmd after renaming otherwise it will overwrite older version of chrome-driver

@barbara
Copy link

barbara commented Aug 30, 2023

@karan-deep I tried this but I still get an error:

Error: SessionNotCreatedError: Unable to create new service: ChromeDriverService
Driver info: driver.version: unknown

Any ideas?

sosy-bot pushed a commit to sosy-lab/cpachecker that referenced this issue Sep 19, 2023
Protractor's downloading of chromedriver is broken
(angular/webdriver-manager#523),
so we add a workaround using a different download tool.

We could do this by changing the CI job definition,
but then we would have to sync this change to every branch.
If we instead change only the Docker image
and hack the npx command (that gets executed by the current CI job)
to do what we need, it will immediately start working again
across all branches, and it will be easy to remove again if necessary.
So while this hack is somewhat ugly, it seems preferable.

Cf. #1141

git-svn-id: https://svn.sosy-lab.org/software/cpachecker/trunk@44685 4712c6d2-40bb-43ae-aa4b-fec3f1bdfe4c
@vatan18
Copy link

vatan18 commented May 20, 2024

@OrangeDog
Copy link

OrangeDog commented May 29, 2024

@StanislavKharchenko

use "selenium-manager" to download latest chromedriver binaries.

Not this surely?

Can you be more specific? What should people use instead of npx webdriver-manager update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests