Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with chromedriver version. Protractor require 2.31

I think the Protractor is looking for the last available version of chromedriver, 2.31. The version was release the 22th of July 2017, 2 days ago. I cannot use this version because it is not compatible with my centos version (GLIBC_2.18).

Any way the chrome site says that the last release is the chromedriver 2.30. So why protractor try to use the 2.31 ? This version is not installed. Is there a way to force the use of a specific version ?

Thanks.

Node Version: v8.1.3 Protractor Version: Version 5.1.2 Chrome version: Google Chrome 59.0.3071.115 Angular Version: 1.5.9 Browser(s): Chrome Operating System and Version Distributor ID: CentOS Description: CentOS Linux release 7.3.1611 (Core) Release: 7.3.1611 Codename: Core

Protractor configuration file:

module.exports = {
    // This will automatically use jasmine latest
    framework: 'jasmine',
    seleniumAddress: 'http://localhost:4444/wd/hub',
    getPageTimeout: 20000,
    allScriptsTimeout: 22000,
    jasmineNodeOpts: {
        showColors: true,
        realtimeFailure: true,
        includeStackTrace: true,
        isVerbose: true,
    },
    capabilities: {
        browserName: 'chrome',
        chromeOptions: {
            args: ['--no-sandbox'],
        },
        loggingPrefs: {driver: 'ALL', server: 'ALL', browser: 'ALL'},
    },
    ...
};

Protractor status:

[root@protractor]# webdriver-manager status
[14:21:22] I/status - selenium standalone version available: 3.4.0 [last]
[14:21:22] I/status - chromedriver version available: 2.30 [last]
[14:21:22] I/status - geckodriver version available: v0.18.0 [last]
[14:21:22] I/status - android-sdk is not present
[14:21:22] I/status - appium is not present

Error:

[14:19:22] I/launcher - Running 1 instances of WebDriver
[14:19:22] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[14:19:22] E/launcher - The driver executable does not exist: /root/.npm-global/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.31
[14:19:22] E/launcher - WebDriverError: The driver executable does not exist: /root/.npm-global/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.31
    at Object.checkLegacyResponse (/root/.npm-global/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:505:15)
    at parseHttpResponse (/root/.npm-global/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/root/.npm-global/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:440:13)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:169:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/root/.npm-global/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
    at Function.createSession (/root/.npm-global/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:709:29)
    at createDriver (/root/.npm-global/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:167:33)
    at Builder.build (/root/.npm-global/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:623:16)
    at Hosted.getNewDriver (/root/.npm-global/lib/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
    at Runner.createBrowser (/root/.npm-global/lib/node_modules/protractor/built/runner.js:195:43)
    at q.then.then (/root/.npm-global/lib/node_modules/protractor/built/runner.js:339:29)
    at _fulfilled (/root/.npm-global/lib/node_modules/protractor/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/root/.npm-global/lib/node_modules/protractor/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/root/.npm-global/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[14:19:22] E/launcher - Process exited with error code 199

Hello,

like image 803
user2382684 Avatar asked Jan 27 '26 01:01

user2382684


1 Answers

Update: ng e2e & protractor are now working!

I also had the same problem this morning. My current solution is:

rm -rf ./node_modules/protractor/node_modules/webdriver-manager/selenium/* #Manually clean
./node_modules/protractor/bin/webdriver-manager clean #webdriver clean
mkdir ./node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver #Fix a silly issue with webdriver trying to move this folder when it doesn't exist
./node_modules/protractor/bin/webdriver-manager update --versions.chrome=2.30 #Get the specific version
ng e2e --webdriver-update false #run npm without updating chromedriver

So therefore my package.json looks like so:

"pree2e": "rm -rf ./node_modules/protractor/node_modules/webdriver-manager/selenium/* && ./node_modules/protractor/bin/webdriver-manager clean && mkdir ./node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver && node ./node_modules/protractor/bin/webdriver-manager update --versions.chrome=2.30",
"e2e": "ng e2e -e mock --webdriver-update false --progres false --watch false",
like image 153
Taylor Avatar answered Jan 30 '26 00:01

Taylor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!