protractor 2.5.4 E/launcher - session not created: This version of ChromeDriver only supports Chrome version 79

断了今生、忘了曾经 提交于 2020-03-26 04:46:15

问题


I have researched a lot and used many possible solutions mentioned in the various forums, none of them worked for me. I am trying to run this in CI/CD pipeline although able to run the protractor test cases in local and able to launch the browser but in CI/CD pipeline build it is failing below are the details

i am using below postinstall under scripts in package.json

"postinstall": "npm uninstall -g webdriver-manager protractor && npm install -g webdriver-manager protractor && webdriver-manager update && cd ./node_modules/protractor && npm i webdriver-manager@latest",

"postinstall": "cd ./node_modules/protractor && npm i webdriver-manager@latest",

for the above script command below error is thrown I/file_manager - creating folder D:\a\1\s\node_modules\protractor\node_modules\webdriver-manager\selenium I/config_source - curl -oD:\a\1\s\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/ I/downloader - curl -oD:\a\1\s\node_modules\protractor\node_modules\webdriver-manager\selenium/chromedriver_79.0.3945.36.zip https://chromedriver.storage.googleapis.com/79.0.3945.16/chromedriver_win32.zip I/update - chromedriver: unzipping chromedriver_79.0.3945.36.zip I/launcher - Running 1 instances of WebDriver I/direct - Using ChromeDriver directly... E/launcher - session not created: This version of ChromeDriver only supports Chrome version 79

when i use below script command i get version issue for 76

    "postinstall": "webdriver-manager update"

I/update - chromedriver: file exists D:\a\1\s\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_76.0.3809.12.zip I/update - chromedriver: unzipping chromedriver_76.0.3809.12.zip I/update - chromedriver: chromedriver_76.0.3809.12.exe up to date I/launcher - Running 1 instances of WebDriver I/direct - Using ChromeDriver directly... E/launcher - session not created: This version of ChromeDriver only supports Chrome version 76 (Driver info: chromedriver=76.0.3809.12

below is config.json under webdriver-manager

{
"webdriverVersions": {
"selenium": "2.53.1",
"chromedriver": "2.27",
"maxChromedriver": "77",
"geckodriver": "v0.13.0",
"iedriver": "2.53.1",
"androidsdk": "24.4.1",
"appium": "1.6.5"
 },
 "cdnUrls": {
"selenium": "https://selenium-release.storage.googleapis.com/",
"chromedriver": "https://chromedriver.storage.googleapis.com/",
"geckodriver": "https://github.com/mozilla/geckodriver/releases/download/",
"iedriver": "https://selenium-release.storage.googleapis.com/",
"androidsdk": "http://dl.google.com/android/"
}
}

Tried many commands that might get worked on the pipeline build but none of them is helping me out. Can any one please suggest what could be the possible issue???


回答1:


this is my first answer in StackOverflow. I was facing the same issue after the new update while I was at work. I tried the same things that @ptiiCarlos mentioned but it didn't fix it. Unfortunately, all other answers were very old but I got some perspective which helped me solve it.

How I did it (Windows 10):

  • Checked the current global chromedriver version: webdriver-manager status.

    In my case it was 79.0.3945.36

  • Downgraded the global chromedriver version: webdriver-manager update --versions.chrome 78.0.3904.105.
  • Check the current global chromedriver version again

    In my case: [03:34:20] I/status - chromedriver versions available: 78.0.3904.105 [last], 79.0.3945.36

  • Checked the current app chromedriver version: node node_modules/protractor/bin/webdriver-manager status

    In my case it was 79.0.3945.36

  • Downgraded the app chromedriver version: node node_modules/protractor/bin/webdriver-manager update --versions.chrome 78.0.3904.105.
  • Checked the current app chromedriver version again.

    In my case: [03:35:15] I/status - chromedriver versions available: 78.0.3904.105 [last], 79.0.3945.36

  • Uninstall Google Chrome
  • Install Google Chrome Version 78.0.3904.97
  • Prevent Chrome from updating
  • Run test

Edit:

You don't need to downgrade Google Chrome.



来源:https://stackoverflow.com/questions/59397086/protractor-2-5-4-e-launcher-session-not-created-this-version-of-chromedriver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!