appium: ChromeDriver install fails behind proxy, when installing appium

The problem

Not able to install Appium 1.6.0 on Mac OSx 10.12 through terminal command

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.0
  • Last Appium version that did not exhibit the issue (if applicable): 1.5.2
  • Desktop OS/version used to run Appium: Mac OS 10.12
  • Node.js version (unless using Appium.app|exe): Latest Version
  • Mobile platform/version under test: iOS
  • Real device or emulator/simulator: iPad Air 2 real device
  • Appium CLI or Appium.app|exe: npm install -g appium

Details

Please check the log below. It is not able to establish connection to the ip 172.217.6.16:80 but i am able to download chromdriver manually from the http://chromedriver.storage.googleapis.com/2.21/chromedriver_mac32.zip

Is there any workaround for this if no fix available ? I tried with 1.6.1/2/3 beta version as well but Result is same.

Our team is trying to do iOS 10.1 iPad App automation.

Automations-Mac:~ automation$ npm -g install appium@1.6.0
/usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js

> appium-chromedriver@2.9.2 install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver
> node install-npm.js

info Chromedriver Install Installing Chromedriver version '2.21' for platform 'mac' and architecture '32'
info Chromedriver Install Opening temp file to write chromedriver_mac32 to...
info Chromedriver Install Downloading http://chromedriver.storage.googleapis.com/2.21/chromedriver_mac32.zip...
RequestError: Error: connect ECONNREFUSED 172.217.6.16:80
    at new RequestError (/usr/local/lib/node_modules/appium/node_modules/request-promise/lib/errors.js:11:15)
    at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/appium/node_modules/request-promise/lib/rp.js:60:32)
    at self.callback (/usr/local/lib/node_modules/appium/node_modules/request/request.js:187:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.onRequestError (/usr/local/lib/node_modules/appium/node_modules/request/request.js:813:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1276:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
/usr/local/lib
└── (empty)

npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "-g" "install" "appium@1.6.0"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! appium-chromedriver@2.9.2 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the appium-chromedriver@2.9.2 install script 'node install-npm.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the appium-chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install-npm.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs appium-chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls appium-chromedriver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/automation/npm-debug.log
npm ERR! code 1

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 30 (9 by maintainers)

Most upvoted comments

We already have a solution for this that I forgot about; you can override the chromedriver CDN url with whatever you want, including using http instead of https:

npm install -g appium --chromedriver-cdnurl=http://chromedriver.storage.googleapis.com

Thanks it worked

On Jul 5, 2017 2:39 PM, “maesiva” notifications@github.com wrote:

start the http-server and run the command: npm install -g appium --chromedriver-cdnurl=http://127.0.0.1:8080

In logs, it will show you, where exactly its looking for the chrome driver zip. I remember copying it to ./public/2.28

. is the folder, from where you are starting the http-server.

Please share your logs after running the command, if you need further info.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/appium/appium/issues/7163#issuecomment-313190176, or mute the thread https://github.com/notifications/unsubscribe-auth/Acav2JVUr1GWu8EeaF9_6IbbUwTvqQYVks5sK9h7gaJpZM4Kokb0 .

Hi @jlipps , I still have Problem using your command.

It tries http:// instead of https://, but I still get ETIMEOUT error.

Thanks @imurchie @jlipps

jlipps commented on 14 Nov 2016 We already have a solution for this that I forgot about; you can override the chromedriver CDN url with whatever you want, including using http instead of https:

npm install -g appium --chromedriver-cdnurl=http://chromedriver.storage.googleapis.com

googleapis http address didn’t work. But, I could download the file via browser @ https://chromedriver.storage.googleapis.com/2.28/chromedriver_linux64.zip

So, started a local http server using https://www.npmjs.com/package/http-server and copied the zip to appropriate folder and run the command:

npm install -g appium --chromedriver-cdnurl=http://127.0.0.1:8080

@SouWilliams @liuxinhu … Dirty, but works like a charm!

I fixed it by taking my machine out of VPN network and got it installed.