0

I am trying to setup protractor for my angular app automation. I am on Node version 12 , I installed protractor version 5.4.3. when I use webdriver-manger update --proxy=blahblahproxy.com , I see the below error.

[13:37:06] I/config_source - curl -oC:\Users\******\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\gecko-response.json '**corpproxy**/repos/mozilla/geckodriver/releases' -H 'host:api.github.com'
(node:15904) UnhandledPromiseRejectionWarning: Error: response status code is not 200.  It was 407
    at Request.<anonymous> (C:\Users\*****\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\built\lib\binaries\config_source.js:181:28)
    at Request.emit (events.js:311:20)
    at Request.onRequestResponse (C:\Users\*****\AppData\Roaming\npm\node_modules\protractor\node_modules\request\request.js:1059:10)
    at ClientRequest.emit (events.js:311:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:603:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
    at Socket.socketOnData (_http_client.js:476:22)
    at Socket.emit (events.js:311:20)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
(node:15904) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15904) [DEP0018] 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.


Chrome and selenium standlaone server are updated/downlaoded just fine 

when i do webdriver-manager status
[13:39:39] I/status - selenium standalone version available: 3.141.59
[13:39:39] I/status - chromedriver version available: 80.0.3987.106
[13:39:39] I/status - geckodriver is not present
[13:39:39] I/status - IEDriverServer is not present
[13:39:39] I/status - android-sdk is not present
[13:39:39] I/status - appium is not present
ishaan
  • 49
  • 1
  • 8

1 Answers1

0

Under corporate proxies we will face issues like this.

The 407 Proxy Authentication Required is an HTTP response status code indicating that the server is unable to complete the request because the client lacks proper authentication credentials for a proxy server that is intercepting the request between the client and server.

Option 1 : Try using selenium-standalone npm package. This is similar to webdriver-manager.

https://www.npmjs.com/package/selenium-standalone

Install this package globally

npm i -g selenium-standalone

Then to download/install the drivers

selenium-standalone install

Then to start the server

selenium-standalone start

(Or)

Option 2: https://stackoverflow.com/a/53358685/8903949

Bharath Kumar S
  • 1,410
  • 2
  • 10
  • 29
  • Could there be a reason why this issue happens only to get gecko driver while chrome and selenium are downloading just fine – ishaan Mar 23 '20 at 13:27