1

I installed Appium 1.6.0 on Mac OS 10.12 via 'sudo npm install -g appium' but it gave me an error when I launched the inspector. So I decided to reinstall it without sudo, since I read it might be the cause.

First, I removed all the npm folders with 'rm -f -r' command, then reinstalled node.js, updated npm and trying to install Appium again, however this time it fails while installing chromedriver. Here's the log from terminal:

sudo npm install -g appium
/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: getaddrinfo ENOTFOUND chromedriver.storage.googleapis.com chromedriver.storage.googleapis.com: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:77:13)
    at Request.emit (events.js:169:7)
    at Request.onRequestError (/usr/local/lib/node_modules/appium/node_modules/request/request.js:813:8)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at Socket.socketErrorListener (_http_client.js:269:9)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at connectErrorNT (net.js:1012:8)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)
/usr/local/lib
└── (empty)

npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "appium"
npm ERR! node v4.6.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/sergei/npm-debug.log
npm ERR! code 1
0

It is quite likely that the connection quality may be causing this. You may want to consider changing the default values for npm's retries, factor, minTimeout and maxTimeout options or try using a different network

Also check if you are able to download the jar manually

curl -L https://github.com/selendroid/selendroid/releases/download/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar > selendroid-server.jar

You may refer the NPM documentation for making config changes here: https://docs.npmjs.com/misc/config

5
  • I can not use different network, I'm doing this from work. – SergioLeone Oct 25 '16 at 10:39
  • I can not download the jar with your code, it gives me an error: "Could not resolve host: github.com" Might this be because I'm behind proxy? But if so, how come it worked fine the first time? – SergioLeone Oct 25 '16 at 10:40
  • You will need to enable and configure proxy setting under npm config for this to work. Alternatively, check if it is possible to connect without proxy (may be by tethering your mobile data) and install appium – BountyHunter Oct 25 '16 at 11:38
  • Thanks BountyHunter. My proxy was set in the ~/.npmrc, but it was not working still. After some struggling with proxies and setting up proxy settings in various locations it's finally working. – SergioLeone Oct 25 '16 at 11:47
  • Glad you were able to make it work. It would be great if you could share the exact changes you did so anyone who refers this post in future would be able to troubleshoot accordingly – BountyHunter Oct 25 '16 at 11:49
0

So what I did was:

set proxies for ~/.npmrc:

proxy=http://<DOMAIN\USERNAME>:<PASSWORD>@<HOST>:<PORT>/
https-proxy=http://<DOMAIN\USERNAME>:<PASSWORD>@<HOST>:<PORT>/

set proxies for ~/.gitconfig:

[http]
        proxy = http://<DOMAIN\USERNAME>:<PASSWORD>@<HOST>:<PORT>/
[https]
        proxy = http://<DOMAIN\USERNAME>:<PASSWORD>@<HOST>:<PORT>/

then executed following commands in bash:

export http_proxy="http://<DOMAIN\USERNAME>:<PASSWORD>@<HOST>:<PORT>/"
export https_proxy="http://<DOMAIN\USERNAME>:<PASSWORD>@<HOST>:<PORT>/"

finally I executed the nmp install command:

npm install -g appium

PS: don't forget to use escape characters if you have special characters in username and/or password

0

I dont know about appium 1.6.0, but I installed 1.6.3 using

npm install -g appium -no-shrinkwrap

I got that from: appium.io

I had the same issue but since, I'm much happier with 1.6.3.

Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.