Open lukaslewandowski-pearson opened 5 years ago
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!
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.
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
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.
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",
@Morcatko Thanks , it worked for me as well :)
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.
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.
Please try running webdriver-manager update with step 1 @krithi0503
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.
Hi @krithi0503 ,
can you please provide your capabilities using to launch the chrome.
Thanks
@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.
Hi @krithi0503 ,
I have 2 updates for you.
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
Thanks!
Hi @krithi0503 ,
I have 2 updates for you.
- 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
- 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",
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
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
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 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
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)
"pree2e": "./node_modules/protractor/bin/webdriver-manager update",
"e2e": "npm run pree2e && ng e2e --webdriver-update=false"
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
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.
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.
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);
}
}
fyi there is a similar issue here: #4728 This might be a duplicate.
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.)