angular / webdriver-manager

A binary manager for E2E testing
MIT License
224 stars 116 forks source link

chromedriver_78.0.3904.70 doesn't work with chrome 78.0.3904.87 #433

Open jrchudy opened 5 years ago

jrchudy commented 5 years ago

I recently updated my chrome browser from chrome 76.xx (can't remember the build number) to chrome 78.0.3904.87. Protractor version = 5.4.2

This initially caused problems with protractor because chromedriver was out of date. I ran node node_modules/protractor/bin/webdriver-manager update to make sure I had the latest chromedriver and was met with chromedriver_76.xx again. After some debugging and uninstalling of my node modules and reinstalling, I was getting the same chromedriver.

I next tried to force the update in webdriver-manager by running node node_modules/protractor/bin/webdriver-manager update --gecko=false --versions.chrome 78.0.3904.87, but was met with a failed download because no chromedriver for that version of chrome exists.

I then tried a simpler version in the same command (78.0.3904 leaving off the trailing minor version) and was given an error as well. I next tried with the latest version I know exists for chrome 78, 78.0.3904.70, and got this error:

[12:16:11] E/launcher - SessionNotCreatedError: session not created: No matching capabilities found
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '<my local pc>', ip: '<removed>', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_101'
Driver info: driver.version: unknown
remote stacktrace: 0   chromedriver_78.0.3904.70           0x000000010b7f7fd9 chromedriver_78.0.3904.70 + 3747801
1   chromedriver_78.0.3904.70           0x000000010b78c613 chromedriver_78.0.3904.70 + 3307027
2   chromedriver_78.0.3904.70           0x000000010b51c10f chromedriver_78.0.3904.70 + 749839
3   chromedriver_78.0.3904.70           0x000000010b4a751e chromedriver_78.0.3904.70 + 271646
4   chromedriver_78.0.3904.70           0x000000010b4a7b4e chromedriver_78.0.3904.70 + 273230
5   chromedriver_78.0.3904.70           0x000000010b4a5263 chromedriver_78.0.3904.70 + 262755
6   chromedriver_78.0.3904.70           0x000000010b47fc0d chromedriver_78.0.3904.70 + 109581
7   chromedriver_78.0.3904.70           0x000000010b480ba5 chromedriver_78.0.3904.70 + 113573
8   chromedriver_78.0.3904.70           0x000000010b7bb0bf chromedriver_78.0.3904.70 + 3498175
9   chromedriver_78.0.3904.70           0x000000010b7c7cbd chromedriver_78.0.3904.70 + 3550397
10  chromedriver_78.0.3904.70           0x000000010b7c7a48 chromedriver_78.0.3904.70 + 3549768
11  chromedriver_78.0.3904.70           0x000000010b79a169 chromedriver_78.0.3904.70 + 3363177
12  chromedriver_78.0.3904.70           0x000000010b7c8518 chromedriver_78.0.3904.70 + 3552536
13  chromedriver_78.0.3904.70           0x000000010b7aeb77 chromedriver_78.0.3904.70 + 3447671
14  chromedriver_78.0.3904.70           0x000000010b7de0d4 chromedriver_78.0.3904.70 + 3641556
15  chromedriver_78.0.3904.70           0x000000010b7fddc7 chromedriver_78.0.3904.70 + 3771847
16  libsystem_pthread.dylib             0x00007fff782862eb _pthread_body + 126
17  libsystem_pthread.dylib             0x00007fff78289249 _pthread_start + 66
18  libsystem_pthread.dylib             0x00007fff7828540d thread_start + 13

    at Object.checkLegacyResponse (/Users/XX/workspace/chaise/node_modules/selenium-webdriver/lib/error.js:546:15)
    at parseHttpResponse (/Users/XX/workspace/chaise/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/Users/XX/workspace/chaise/node_modules/selenium-webdriver/lib/http.js:441:30)
    at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/Users/XX/workspace/chaise/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
    at Function.createSession (/Users/XX/workspace/chaise/node_modules/selenium-webdriver/chrome.js:761:15)
    at createDriver (/Users/XX/workspace/chaise/node_modules/selenium-webdriver/index.js:170:33)
    at Builder.build (/Users/XX/workspace/chaise/node_modules/selenium-webdriver/index.js:626:16)
    at Local.getNewDriver (/Users/XX/workspace/chaise/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
    at Runner.createBrowser (/Users/XX/workspace/chaise/node_modules/protractor/built/runner.js:195:43)
    at q.then.then (/Users/XX/workspace/chaise/node_modules/protractor/built/runner.js:339:29)
    at _fulfilled (/Users/XX/workspace/chaise/node_modules/protractor/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/Users/XX/workspace/chaise/node_modules/protractor/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/Users/XX/workspace/chaise/node_modules/protractor/node_modules/q/q.js:796:13)
[12:16:11] E/launcher - Process exited with error code 199

I thought that was an odd error, but decided I would try one last thing which was to delete my node_modules and reinstall them again. Then I navigated to node_modules/protractor and ran npm i webdriver-manager@latest. Then one more time, node node_modules/protractor/bin/webdriver-manager update and I was met with the latest chromedriver for chrome 78 (chromedriver_78.0.3904.70).

I tried to run my tests again and was met with the same error above. This at least verified my suspicions that I was using the latest chromedriver for chrome 78. And also verified that that version of chromedriver hasn't a bug with a slightly newer version of chrome.

NOTE: I didn't try to downgrade from chrome 78.0.3904.87 to chrome 78.0.3904.70 as it is too much of a hassle.

jrchudy commented 5 years ago

Upon trying one more thing before giving up for now, I found that we had this command hidden in our project node_modules/protractor/bin/webdriver-manager update --versions.standalone 3.6.0.

I repeated the process for a third time:

You can close this if you think it's a non-issue, but I think there might be some bugs with how webdriver-manager update fetches the latest chrome driver. It took me having to uninstall my node_modules and reinstalling them, then forcing the installation of the most recent webdriver-manager from inside protractor to get this working again.

I'm using Protractor version 5.4.2.