Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Protractor 5.4.2 lack of support for new chromedriver versions like 76.0.3809.68 #5289

Open
lukaslewandowski-pearson opened this issue Aug 1, 2019 · 22 comments

Comments

@lukaslewandowski-pearson
Copy link

lukaslewandowski-pearson commented Aug 1, 2019

Hi,

Bug report
Protractor 5.4.2 can't work with new Chrome versions like 76.0.3809.87

Feature Request
Add support for new chromedriver versions naming convention to Protractor 5.4.2 due to issues with Protractor 6

(My tests are executing in parallel mode with directConnet: true and I am using async/await.)

@harsha509
Copy link

Hi @lukaslewandowski-pearson ,

There is webdriver-manager version 12.1.6 which supports chrome 76. You can install through npm i webdriver-manager@12.1.6. It may resolve the issue.

The new webdriver-manager will be released along with latest protractor version later

Thanks!

@lukaslewandowski-pearson
Copy link
Author

lukaslewandowski-pearson commented Aug 1, 2019

Hi @harsha509 ,
Thx for replay but it looks like Protractor is using his own webdriver-manager in node_modules/protractor/node_modules/webdriver-manager and adding webdriver-manager to project dependencies or installing it globally is not changing the behavior of the Protractor.

I will add that my tests are executing in parallel mode with directConnet: true and I am using async/await.

@Morcatko
Copy link

Morcatko commented Aug 1, 2019

I was able to fix it by adding this to my test project package.json

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

It reinstalls webdriver-manager used internally by protractor.
You can add && node bin/webdriver-manager update but some other postinstall script runs that for me automatically

@harsha509
Copy link

Hi @lukaslewandowski-pearson

directConnect: true uses drivers available in node_modules in current directory,
enabling below in config

@Morcatko thanks for the workaround.

hope this both solution helps

directConnect: false,
seleniumAddress:"http://localhost:4444/wd/hub"

and starting webdriver-manager start globally uses the selenium server started globally.

@lukaslewandowski-pearson
Copy link
Author

WOW @Morcatko I own you a beer :) it works like a charm :) Thank you

My final version:
"postinstall": "cd ./node_modules/protractor && npm i webdriver-manager@latest && cd ../.. && ./node_modules/.bin/webdriver-manager update",

@Dolly2315
Copy link

@Morcatko Thanks , it worked for me as well :)

ghost pushed a commit to systelab/systelab-components that referenced this issue Aug 7, 2019
- Modified 'package.json' due to an open issue in Protractor with webdriver-manager and latest version of Chrome (angular/protractor#5289).
ghost pushed a commit to systelab/systelab-components that referenced this issue Aug 7, 2019
- Modified 'package.json' due to an open issue in Protractor with webdriver-manager and latest version of Chrome (angular/protractor#5289).
ghost pushed a commit to systelab/systelab-components that referenced this issue Aug 7, 2019
- Modified 'package.json' due to an open issue in Protractor with webdriver-manager and latest version of Chrome (angular/protractor#5289).
ghost pushed a commit to systelab/systelab-components that referenced this issue Aug 8, 2019
- Modified 'package.json' due to an open issue in Protractor with webdriver-manager and latest version of Chrome (angular/protractor#5289). Use the default Chrome version provided by Travis.
ghost pushed a commit to systelab/systelab-components that referenced this issue Aug 8, 2019
- Modified 'package.json' due to an open issue in Protractor with webdriver-manager and latest version of Chrome (angular/protractor#5289). Use the default Chrome version provided by Travis.
ghost pushed a commit to systelab/systelab-components that referenced this issue Aug 8, 2019
- Modified 'package.json' due to an open issue in Protractor with webdriver-manager and latest version of Chrome (angular/protractor#5289).
- Revert changes and comment the e2e execution until the Travis' issue is not fixed.
@krithi0503
Copy link

krithi0503 commented Aug 8, 2019

Hi All,

I tried all of the above suggestions with no luck yet. I have tried the below -

1. directConnect: true

And then in my package.json added

"postinstall": "cd ./node_modules/gulp-protractor && npm i webdriver-manager@12.1.6 && cd ../../ && ./node_modules/.bin/webdriver-manager update --gecko=false"

I have tried this with and without adding explicit dependency

"webdriver-manager": "12.1.6"

The below is the error message I see -

E/direct - Error code: 135
[12:06:06] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[12:06:06] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
  1. directConnect: false

Same Dependency and Post Install script as above. I am able to see the browser launch with the web url but nothing else happens.

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'MC02S8298G8WM', ip: '192.168.130.131', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_181'
Driver info: driver.version: unknown
UnsupportedOperationError: touchSingleTap
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'MC02S8298G8WM', ip: '192.168.130.131', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_181'
Driver info: driver.version: unknown

The Chrome is currently on version 76.0.3809.100 and the latest chromedriver downloaded seems to be chromedriver_76.0.3809.12 for webdriver@12.1.6. I specifically tried mentioning a different higher version as well in update command

webdriver-manager update --versions.chrome=76.0.3809.68

The below was the error -

[12:24:58] E/launcher - Unable to create new service: ChromeDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'MC02S8298G8WM', ip: '192.168.130.131', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_181'
Driver info: driver.version: unknown

I am pretty much flabbergasted and out of options. Is there anything else we could try?
P.S : Protractor upgrade is not feasible since we can't upgrade our node version.

@Dolly2315
Copy link

Please try running webdriver-manager update with step 1 @krithi0503

@krithi0503
Copy link

Please try running webdriver-manager update with step 1 @krithi0503

Unfortunately still throws the error -
Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.

@harsha509
Copy link

Hi @krithi0503 ,

can you please provide your capabilities using to launch the chrome.

Thanks

@krithi0503
Copy link

krithi0503 commented Aug 9, 2019

@harsha509 : These are the code snippets corresponding to the capabilities in config -

directConnect: true,
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 4,
chromeOptions: {
     mobileEmulation: {
           deviceName: 'iPhone 6'
     } 
}

Note : I have tried without parallel execution as well.

@harsha509
Copy link

Hi @krithi0503 ,

I have 2 updates for you.

  1. As you're using directConnect: true ,

navigate to project root/node_modules/.bin webdriver-manager clean and
project root/node_modules/.bin> npm i webdriver-manager@12.1.6 and
project root/node_modules/.bin>webdriver-manager update

It should download chrome 76_drivers

if you see any error -> 'Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.'

you can do

project_root\node_modules\protractor\node_modules\webdriver-manager\bin> node webdriver-manager update

  1. If you're using chorme 75 + versions, 'chromeOptions' doesn't work. they have changed their capability to 'goog:chromeOptions' which current selenium doesn't support. you have to update to selenium 4 else downgrade to chrome 74

Thanks!

@krithi0503
Copy link

Hi @krithi0503 ,

I have 2 updates for you.

  1. As you're using directConnect: true ,

navigate to project root/node_modules/.bin webdriver-manager clean and
project root/node_modules/.bin> npm i webdriver-manager@12.1.6 and
project root/node_modules/.bin>webdriver-manager update

It should download chrome 76_drivers

if you see any error -> 'Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.'

you can do

project_root\node_modules\protractor\node_modules\webdriver-manager\bin> node webdriver-manager update

  1. If you're using chorme 75 + versions, 'chromeOptions' doesn't work. they have changed their capability to 'goog:chromeOptions' which current selenium doesn't support. you have to update to selenium 4 else downgrade to chrome 74

Thanks!

Thanks for this. With minor tweaks this solution worked. Modified to 'goog:chromrOptions' and added this in postInstall script -

"postinstall": "cd ./node_modules/webdriver-manager && webdriver-manager clean && cd ../.. && npm i webdriver-manager@12.1.6 --no-save && webdriver-manager update --gecko=false && cd ./node_modules/gulp-protractor && npm i webdriver-manager@12.1.6 --no-save && webdriver-manager update --gecko=false",

@tfaron
Copy link

tfaron commented Aug 12, 2019

Using directConnect=false, we start a seleniumSession and pass the seleniumSessionId however as of 12.1.5 passing seleniumSessionId fails with the following error so not sure how we can connect using Chrome 76.

...\projects\client-ng\node_modules.bin\protractor C:\svt-web-client\projects\client-ng\protractor.e2e.atf.conf.js --seleniumSessionId=f2720b90bf7763c8ba87ecf155b33d31 --grep "C1980075_OMNI_69706_6"'
[08:59:57] I/launcher - Running 1 instances of WebDriver
[08:59:57] I/attachSession - Using the selenium server at http://127.0.0.1:4444/wd/hub
[08:59:57] I/attachSession - Using session id - f2720b90bf7763c8ba87ecf155b33d31
[08:59:57] E/runner - Unable to start a WebDriver session.
[08:59:57] E/launcher - Error: UnsupportedOperationError: unknown command: Cannot call non W3C standard command while in W3C mode
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'DESKTOP-KP0NDTR', ip: '16.100.206.160', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_221'
Driver info: driver.version: unknown
at Object.checkLegacyResponse (C:\svt-web-client\projects\client-ng\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\svt-web-client\projects\client-ng\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\svt-web-client\projects\client-ng\node_modules\selenium-webdriver\lib\http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
[08:59:57] E/launcher - Process exited with error code 100

rogargon added a commit to rhizomik/rhizomerEye that referenced this issue Aug 12, 2019
jjelschen pushed a commit to test-editor/test-editor-web that referenced this issue Aug 13, 2019
Protractor uses its own version of webdriver manager, which is too old to support Chrome 76.

* angular/webdriver-manager#404
* angular/protractor#5289

Its really not worth the effort implementing any of the suggested workarounds.
For now, the e2e tests on Chrome will simply not be executed on Travis.
Once Protractor 5 is updated with the latest webdriver manager version, we can turn them back on again.
jjelschen pushed a commit to test-editor/test-editor-web that referenced this issue Aug 13, 2019
…165)

Protractor uses its own version of webdriver manager, which is too old to support Chrome 76.

* angular/webdriver-manager#404
* angular/protractor#5289

Its really not worth the effort implementing any of the suggested workarounds.
For now, the e2e tests on Chrome will simply not be executed on Travis.
Once Protractor 5 is updated with the latest webdriver manager version, we can turn them back on again.
@oomkarpandit
Copy link

oomkarpandit commented Aug 14, 2019

Try this - it worked for me: Using Direct Connect.

Add this script to package.json:
"postinstall": "cd ./node_modules/protractor && npm i webdriver-manager@latest",

then:

npm run postinstall
webdriver-manager update
npx webdriver-manager update

@gmangat
Copy link

gmangat commented Aug 14, 2019

I was getting the error before "Chrome version should be between 71 and 75" and now have updated the latest chrome driver and also added the above in package.json but now i started getting some circular reference error. This is the updated chrome driver
image
The error i keep getting after now is :
[Failed: javascript error: circular reference
(Session info: chrome=76.0.3809.100)
(Driver info: chromedriver=76.0.3809.12 (220b19a666554bdcac56dff9ffd44c300842c933-refs/branch-heads/3809@{#83}),platform=Windows NT 10.0.17763 x86_64)

Any idea/ help will be really appreciated

@brunonf15
Copy link

Same issue here.
After the update, this error also appears:

[16148:0814/103221.329:INFO:CONSOLE(170)] "%cElectron Security Warning (Insecure Content-Security-Policy)", source: C:\Users\bruno.figueiredo\Pictures\smc-monitor-software\node_modules\electron\dist\resources\electron.asar\renderer\security-warnings.js (170)
[10:33:17] E/launcher - unknown error: DevToolsActivePort file doesn't exist
  (Driver info: chromedriver=76.0.3809.12 (220b19a666554bdcac56dff9ffd44c300842c933-refs/branch-heads/3809@{#83}),platform=Windows NT 10.0.17763 x86_64)
[10:33:17] E/launcher - WebDriverError: unknown error: DevToolsActivePort file doesn't exist
  (Driver info: chromedriver=76.0.3809.12 (220b19a666554bdcac56dff9ffd44c300842c933-refs/branch-heads/3809@{#83}),platform=Windows NT 10.0.17763 x86_64)
    at Object.checkLegacyResponse (C:\Users\bruno.figueiredo\Pictures\smc-monitor-software\node_modules\selenium-webdriver\lib\error.js:546:15)

@ghost
Copy link

ghost commented Aug 16, 2019

    "pree2e": "./node_modules/protractor/bin/webdriver-manager update",
    "e2e": "npm run pree2e && ng e2e --webdriver-update=false"

rogargon added a commit to rogargon/copyrightly that referenced this issue Aug 16, 2019
rogargon added a commit to rogargon/copyrightly that referenced this issue Aug 16, 2019
@Amy-Lynn
Copy link

The solutions here seem to mostly require the webdriver-manager used by protractor being in a known location, which isn't great if you're providing a framework library to be consumed by others (who may use hoisting in a monorepo).

I don't love it, but would (optionally) specifying the folder of webdriver-manager for protractor to use be an option? Then I can list webdriver-manager as a direct dependency of my project, point it at that, and not need to jump through the hoops of finding where the one protractor is going to use is installed

@istudiomobile
Copy link

istudiomobile commented Sep 25, 2019

I have exact same error as @brunonf15 but with Chrome 77 using webdriver-manager 77.0.3865.10, 77.0.3865.40 and 77.0.3865.75 in Angular 7 running tests with VS Code.

@smhc
Copy link
Contributor

smhc commented Oct 22, 2019

I have a related problem running Protractor 5.4.2 with Chrome, IE or any other driver implementing w3c. The 'window/resize' command has been renamed 'window/rect' and webdriver 3.6 does not have the compatibility layer that webdriver 4+ has.

see: https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/lib/webdriver.js#L1462

and https://www.w3.org/TR/webdriver1/#set-window-rect

I have had to work around the problem with the following hack:

browser.driver.getExecutor().defineCommand('setWindowRect_W3C', 'POST', '/session/:sessionId/window/rect');

    public static resize(width: number, height: number) {
        // Determine if driver is w3c compliant or not
        if ((<any>browser.driver).getExecutor().w3c) {
            // We need to manually construct a command because webdriver 3.6.0
            // does not construct a w3c compliant 'rect' command. This results
            // in errors such as: unknown command: session/xxx/window/size
            // for browsers that have deprecated the JSON wire protocol API
            let resizeCommand = new Command('setWindowRect_W3C');
            resizeCommand.setParameter('x', 0);
            resizeCommand.setParameter('y', 0);
            resizeCommand.setParameter('height', height);
            resizeCommand.setParameter('width', width);

            return browser.driver.schedule(resizeCommand, 'W3C-shim window rect: ' + height + ',' + width);
        } else {
            // If not w3c driver, use old JSON wire protocol API
            return browser.driver.manage().window().setSize(width, height);
        }
    }

@DanielHabenicht
Copy link

fyi there is a similar issue here: #4728
This might be a duplicate.

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

No branches or pull requests