Experts,
I have following configuration
nvm - 0.33.0
node - 7.5.0
npm - 4.1.2
webdriver-manager - 12.0.6
I am behind a corporate proxy and I use cntlm. when I run the following command
webdriver-manager update --standalone --ignore_ssl --verbose --proxy="http://localhost:3190/"
I get following output
webdriver-manager: using global installed version 12.0.6
[15:08:27] I/http_utils - ignoring SSL certificate
[15:08:27] I/http_utils - ignoring SSL certificate
[15:08:27] I/http_utils - ignoring SSL certificate
(node:4132) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: response status code is not 200
(node:4132) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[15:08:28] I/update - chromedriver: unzipping chromedriver_2.33.zip
[15:08:28] I/update - chromedriver: setting permissions to 0755 for /home/ua70vv/.nvm/versions/node/v7.5.0/lib/node_modules/webdriver-manager/selenium/chromedriver_2.33
[15:08:29] I/http_utils - ignoring SSL certificate
[15:08:34] I/update - geckodriver: unzipping geckodriver-v0.19.0.tar.gz
[15:08:34] I/update - geckodriver: setting permissions to 0755 for /home/ua70vv/.nvm/versions/node/v7.5.0/lib/node_modules/webdriver-manager/selenium/geckodriver-v0.19.0
I see there is a warning.
After this when I try to run "webdriver-manager start", I still get error complaining following
E/start - Selenium Standalone is not present. Install with webdriver-manager update --standalone
Please suggest what is the error here.
Thanks in advance!
--ignore_ssl Ignore SSL certificates
--proxy Proxy to use for the install or update command
Like webdriver-manager update --ignore_ssl
This will solve your problem.
seems the standalone.jar download site not avaiable. https://selenium-release.storage.googleapis.com/
you can use java cmd to start selenium server, save below content into a start-selenium-server.cmd file on window, and change the versions and driver_home to yours. Double click it to run.
set standalone_version=3.4.0
set chromedriver_version=2.32
set geckodriver_version=v0.19.0
set driver_home=C:\Tool\npm-global\node_modules\protractor\node_modules\webdriver-manager\selenium
java -Dwebdriver.chrome.driver=%driver_home%\chromedriver_%chromedriver_version%.exe -Dwebdriver.gecko.driver=%driver_home%\geckodriver-%geckodriver_version%.exe -jar %driver_home%\selenium-server-standalone-%standalone_version%.jar -port 4444
Related
At my company, there is an auto signed ssl certificate. So they're some npm packages that cannot be installed because of it.
I already add strict-ssl=false in .npmrc or --strict-ssl=false command args.
It works for some packages but some doesn't seems to take in charge this option.
For exemple, I tried to install Cypress :
Command :
npm i cypress --save-dev --strict-ssl=false
Error logs :
> cypress#3.4.0 postinstall /Users/mchoraine/Documents/Workplace/SAMSE/rechercheproduit/rechercheproduit-front/node_modules/cypress
> node index.js --exec install
Installing Cypress (version: 3.4.0)
✖ Downloading Cypress
→ Cypress Version: 3.4.0
Unzipping Cypress
Finishing Installation
The Cypress App could not be downloaded.
Please check network connectivity and try again:
----------
URL: https://download.cypress.io/desktop/3.4.0?platform=darwin&arch=x64
Error: self signed certificate in certificate chain
----------
Platform: darwin (18.6.0)
Cypress Version: 3.4.0
Problem seems to occur only for packages with postinstall
The smartest things would be to change the SSL certificate but unfortunately it can't be done.
So are you aware of an alternative to bypass certificat verification on npm postinstall ?
Thanks in advance for your proposal.
Get a copy of your company's certificate, then set the NODE_EXTRA_CA_CERTS environmental variable to point to it before you run the npm commnand:
export NODE_EXTRA_CA_CERTS=path/to/certificate.crt
The post-install script is a separate node program, so the npm flag doesn't affect it.
Credit goes to "zerdos" who posted this solution on a related GitHub issue: https://github.com/cypress-io/cypress/issues/1401#issuecomment-393591520
For me the following solution worked.
OS - windows 10
Terminal - git bash
Run these commands before installing cypress.
setx HTTP_PROXY <your company proxy url>
setx NODE_EXTRA_CA_CERTS <path to cerm.pem file>
These will be set as environment variables in your system for any future use.
You can always get rid of them anytime if you do not need them.
I need to install and use Protractor / Selenium on the machine without Internet access.
To do that, I've tried to download all needed files and copy them to the destination machine.
On my machine (with Internet access)
I installed Protractor and Selenium webdriver with the following command:
npm install -g protractor
webdriver-manager update
On destination machine (without Internet access)
I copied all files from the location returned by npm config get prefix to the computer without Internet access.
Then I executed following command on the machine without Internet access:
npm --cache-min 9999999 install -g protractor
which seems to succeed.
However, when I try to execute webdriver-manager start command, I receive following error message:
events.js:183
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND chromedriver.storage.googleapis.com
chromedriver.storage.googleapis.com:443
at errnoException (dns.js:50:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
I receive the same error when executing webdriver-manager update (as in this case: webdriver-manager start: Error: connect ETIMEDOUT)
Question
What am I doing wrong? How should I properly setup Protractor and webdriver on the machine without Internet access?
Because webdriver-manager start will look up the latest version number of selenium-server.jar and webdriver binaries through internet no matter they are already exists on local.
But webdriver-manager not supply cmd option to disable the looking up.
The quick way is to run the java cmd behind webdriver-manager start directly to skip the looking up.
java
-Dwebdriver.chrome.driver=C:\Tools\npm-global\node_modules\webdriver-manager\selenium\chromedriver_2.38.exe
-Dwebdriver.gecko.driver=C:\Tools\npm-global\node_modules\webdriver-manager\selenium\geckodriver-v0.20.1.exe
-jar C:\Tools\npm-global\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.11.0.jar
-port 4444
The complex way is to change webdriver-manager code or setup a mirror on local and use cmd option: --alternate_cdn and point it to your local mirror url. ( I didn't verify this can work, get it after read some source code)
When I issue the command
webdriver-manager update while starting my protractor script execution I see below error message:
"Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TLSWrap.onread (net.js:568:26)"
Add proxy if your network behind proxy.
webdriver-manager update --proxy http://yourproxy:yourport.
Also add proxy for webdriver-manager start.
If you don't like to type the proxy every time, you can add HTTP_PROXY, HTTPS_PROXY and NO_PROXY Environment Variables.
It seems you are behind corporate firewall, Try below commands. It should work fine.
webdriver-manager update --ignore-ssl --proxy http://XXX.XXX.XXX:80
webdriver-manager start --ignore-ssl --proxy http://XXX.XXX.XXX:80
if both of them doesn't work. Try the below command as well.
webdriver-manager update --proxy http://XXX.XXX.XXX:8000 --ignore_ssl --gecko false
I am getting the following errors with webdriver-manager update. My protractor is at version 5.1.1
my_local_windows_directory>webdriver-manager update
events.js:160
throw er; // Unhandled 'error' event
^
Error: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:
at exports._errnoException (util.js:1022:11)
at WriteWrap.afterWrite (net.js:801:14)
Any ideas to resolve this issue. I am behind a corporate Lan, but I tried BYOD network as well, but still this did not resolve.
1) Restart mac
2) Run this -> webdriver-manager update
3) Run this -> webdriver-manager start
4) Also you can check your ports sudo lsof -iTCP -sTCP:LISTEN -n -P
Currently I am using the below commands for start the server (using Mocha framework) during second command am getting an error message. Please find the below and share your input
1. npm install selenium-standalone#latest -g
2. selenium-standalone install
3. selenium-standalone start
Error Log: During "selenium-standalone install"
firefox install:
from:
https://github.com/mozilla/geckodriver/releases/download/v0.13.0/geckodriv
er-v0.13.0-win64.zip to:
C:\Users\xxuser\AppData\Roaming\npm\node_modules\selenium-standalone.selen
ium\geckodriver\0.13.0-x64-geckodriver
C:\Users\xxuser\AppData\Roaming\npm\node_modules\selenium-standalone\bin\seleni
um-standalone:105
throw err;
^ Error: Could not download https://selenium-release.storage.googleapis.com/3.0/IE
DriverServer_x64_3.0.1.zip
at Request. (C:\Users\xxuser\AppData\Roaming\npm\node_modules\se
lenium-standalone\lib\install.js:273:21)
It is either an issue with google not having the file in the right place or selenium-standalone having the wrong url. If you go to https://github.com/mozilla/geckodriver/releases/download/v0.13.0/geckodriver-v0.13.0-win64.zip
it will download a zip file.
if you go to https://selenium-release.storage.googleapis.com/3.0/IE%20DriverServer_x64_3.0.1.zip
you get:
NoSuchKeyThe specified key does not exist.
The issue isn't firefox (gecko) driver it is internet explorer's driver.