Not able to install appium 1.4.12

Hi,

I am trying to install appium 1.4.12 using node.js, but its not happening. I am getting the below error in cmd. [node.js version used is node-v0.10.32-x64]

C:\Users\lvuser2\npm>npm update -g appium

npm WARN optional dep failed, continuing [email protected]

[email protected] install
C:\Users\lvuser2\AppData\Roaming\npm\node_modules

\appium\node_modules\ws\node_modules\utf-8-validate

node-gyp rebuild

C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modules\ws\node_mo

dules\utf-8-validate>node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp

-bin\…..\node_modules\node-gyp\bin\node-gyp.js"
rebuild

gyp ERR!
configure error

gyp ERR!
stack Error: Can’t find Python executable “python”, you can set the
PYT

HON env
variable.

gyp ERR!
stack at failNoPython (C:\Program
Files\nodejs\node_modules\npm\nod

e_modules\node-gyp\lib\configure.js:103:14)

gyp ERR! stack at
C:\Program Files\nodejs\node_modules\npm\node_modules\node

-gyp\lib\configure.js:64:11

gyp ERR! stack at
Object.oncomplete (evalmachine.:107:15)

gyp ERR! System Windows_NT 6.1.7601

gyp ERR! command “node” "C:\Program
Files\nodejs\node_modules\npm\node_modu

les\node-gyp\bin\node-gyp.js" “rebuild”

gyp ERR! cwd
C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modul

es\ws\node_modules\utf-8-validate

gyp ERR! node -v v0.10.32

gyp ERR! node-gyp -v v1.0.1

gyp ERR! not ok-

npm WARN optional dep failed, continuing
[email protected]

|

[email protected] install
C:\Users\lvuser2\AppData\Roaming\npm\node_modules\app

ium\node_modules\ws\node_modules\bufferutil

node-gyp rebuild

C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modules\ws\node_mo

dules\bufferutil>node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin

\…..\node_modules\node-gyp\bin\node-gyp.js" rebuild

gyp ERR!
configure error

gyp ERR!
stack Error: Can’t find Python executable “python”, you can set the
PYT

HON env
variable.

gyp ERR!
stack at failNoPython (C:\Program
Files\nodejs\node_modules\npm\nod

e_modules\node-gyp\lib\configure.js:103:14)

gyp ERR! stack at
C:\Program Files\nodejs\node_modules\npm\node_modules\node

-gyp\lib\configure.js:64:11

gyp ERR! stack at
Object.oncomplete (evalmachine.:107:15)

gyp ERR! System Windows_NT 6.1.7601

gyp ERR! command “node” "C:\Program Files\nodejs\node_modules\npm\node_modu

les\node-gyp\bin\node-gyp.js" “rebuild”

gyp ERR! cwd
C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modul

es\ws\node_modules\bufferutil

gyp ERR! node -v v0.10.32

gyp ERR! node-gyp -v v1.0.1

gyp ERR! not ok

npm WARN optional dep failed, continuing [email protected]

npm WARN engine [email protected]: wanted:
{“node”:“>=0.10.40”} (current:
{“node”:"0.10

.32",“npm”:“1.4.28”})

npm WARN engine [email protected]: wanted:
{“node”:“>=0.10.40”} (current: {“node”:

“0.10.32”,“npm”:“1.4.28”})

npm WARN engine [email protected]: wanted:
{“node”:“>=0.10.40”} (current:
{“node”:"0.1

0.32",“npm”:“1.4.28”})

npm WARN engine [email protected]: wanted:
{“node”:“>=0.10.40”} (current: {“node”:

“0.10.32”,“npm”:“1.4.28”})

npm WARN engine [email protected]: wanted:
{“node”:“>=0.10.40”} (current:
{“node”:"0.10

.32",“npm”:“1.4.28”})

npm WARN engine [email protected]: wanted:
{“node”:“>=0.10.40”} (current:
{“node”:"0.1

0.32",“npm”:“1.4.28”})

|

[email protected] install
C:\Users\lvuser2\AppData\Roaming\npm\node_modules

\appium\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modul

es\utf-8-validate

node-gyp rebuild

C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modules\socket.io\

node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate>node
"C:\Prog

ram
Files\nodejs\node_modules\npm\bin\node-gyp-bin\…..\node_modules\node-gyp\

bin\node-gyp.js" rebuild

gyp ERR! configure error

gyp ERR! stack Error: Can’t find Python executable
“python”, you can set the PYT

HON env variable.

gyp ERR! stack at
failNoPython (C:\Program Files\nodejs\node_modules\npm\nod

e_modules\node-gyp\lib\configure.js:103:14)

gyp ERR! stack at
C:\Program Files\nodejs\node_modules\npm\node_modules\node

-gyp\lib\configure.js:64:11

gyp ERR! stack at
Object.oncomplete (evalmachine.:107:15)

gyp ERR! System Windows_NT 6.1.7601

gyp ERR! command “node” "C:\Program
Files\nodejs\node_modules\npm\node_modu

les\node-gyp\bin\node-gyp.js" “rebuild”

gyp ERR! cwd
C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modul

es\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate

gyp ERR! node -v v0.10.32

gyp ERR! node-gyp -v v1.0.1

gyp ERR! not ok

npm WARN optional dep failed, continuing
[email protected]

\

[email protected] install
C:\Users\lvuser2\AppData\Roaming\npm\node_modules\app

ium\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\b

ufferutil

node-gyp rebuild

|

C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modules\socket.io\

node_modules\engine.io\node_modules\ws\node_modules\bufferutil>node
"C:\Program

Files\nodejs\node_modules\npm\bin\node-gyp-bin\…..\node_modules\node-gyp\bin\

node-gyp.js" rebuild

gyp ERR! configure error

gyp ERR! stack Error: Can’t find Python executable
“python”, you can set the PYT

HON env variable.

gyp ERR! stack at
failNoPython (C:\Program Files\nodejs\node_modules\npm\nod

e_modules\node-gyp\lib\configure.js:103:14)

gyp ERR! stack at
C:\Program Files\nodejs\node_modules\npm\node_modules\node

You need to install Python and/or make it available on your $PATH. I think there are several ways to install Python on Windows so you’ll probably want to do a google search and decide on the way you are most comfortable with. A good installer will put the Python binary on your $PATH.

There are probably other errors, but take care of this one first, then see what’s left.

Hi @wreed

I was wondering that why we are going to install appium need install Python first ? Do you have any comments on this ?

Sure, this person is trying to install via ‘node-gyp’. ‘gyp’ is written in Python.

Thanks, weed. However, i noticed that when i try to install appium by npm, there will be python error as well. I don’t know what’s going on there.

I’m sorry, I did a google search but I still don’t know what ‘nom’ is. Maybe you could post the log?

Sorry, my fault. i mean npm…

Ok, I still think posting the error log would go a long way in helping to understand your problem.

Hi @wreed

I installed python2.7. Yet I am getting a error pasted below

C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modules\socket.io
node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node
_modules\utf-8-validate>if not defined npm_config_node_gyp (node “C:\Program Fil
es\nodejs\node_modules\npm\bin\node-gyp-bin\…..\node_modules\node-gyp\bin\nod
e-gyp.js” rebuild ) else (node rebuild )

C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modules\socket.io
\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\no
de_modules\utf-8-validate\build\binding.sln : error MSB3411: Could not load the
Visual C++ component “VCBuild.exe”. If the component is not installed, either
1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework
3.5, or 2) install Microsoft Visual Studio 2008.

gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
gyp ERR! cwd C:\Users\lvuser2\AppData\Roaming\npm\node_modules\appium\node_modul
es\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_mo
dules\ws\node_modules\utf-8-validate
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]

[email protected] install C:\Users\lvuser2\AppData\Roaming\npm\node_modules\app
ium\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-
client\node_modules\ws\node_modules\bufferutil
node-gyp rebuild

I also installed Visual studio 2013. It gave another error. Please suggest any solution.
Thank you in advance

[email protected] install C:\Users\chandan.murali\AppData\Roaming\npm\node_
modules\appium\node_modules\ws\node_modules\utf-8-validate
node-gyp rebuild

C:\Users\chandan.murali\AppData\Roaming\npm\node_modules\appium\node_modules\ws
node_modules\utf-8-validate>node “C:\Program Files\nodejs\node_modules\npm\bin\n
ode-gyp-bin\…..\node_modules\node-gyp\bin\node-gyp.js” rebuild
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: incorrect header check
gyp ERR! stack at Zlib._binding.onerror (zlib.js:295:17)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command “node” “C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js” “rebuild”
gyp ERR! cwd| C:\Users\chandan.murali\AppData\Roaming\npm\node_modules\appium\no
de_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]

[email protected] install C:\Users\chandan.murali\AppData\Roaming\npm\node_modu
les\appium\node_modules\ws\node_modules\bufferutil
node-gyp rebuild

/
C:\Users\chandan.murali\AppData\Roaming\npm\node_modules\appium\node_modules\ws
node_modules\bufferutil>node “C:\Program Files\nodejs\node_modules\npm\bin\node-
gyp-bin\…..\node_modules\node-gyp\bin\node-gyp.js” rebuild
gyp WARN install got an error, rolling back install
ERR! configure error
gyp ERR! stack Error: incorrect header check
gyp ERR! stack at Zlib._binding.onerror (zlib.js:295:17)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command “node” “C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js” “rebuild”
gyp ERR! cwd C:\Users\chandan.murali\AppData\Roaming\npm\node_modules\appium\nod
e_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
npm WARN engine [email protected]: wanted: {“node”:“0.8.x”} (current: {“node”:"0.10.32
",“npm”:“1.4.28”})
npm WARN engine [email protected]: wanted: {“node”:“0.8.x”} (current: {“node”:“0.10.32”
,“npm”:“1.4.28”})
npm WARN engine [email protected]: wanted: {“node”:“0.8.x”} (current: {“node”:“0.1
0.32”,“npm”:“1.4.28”})
npm WARN engine [email protected]: wanted: {“node”:“0.8.x”} (current: {“node”:“0.10.32”
,“npm”:“1.4.28”})
npm WARN engine [email protected]: wanted: {“node”:“0.8.x”} (current: {“node”:“0.10.32”
,“npm”:“1.4.28”})

[email protected] install C:\Users\chandan.murali\AppData\Roaming\npm
node_modules\appium\node_modules\appium-chromedriver
node install-npm.js

info Chromedriver Install Opening temp file to write chromedriver_win32 to…
info Chromedriver Install Downloading http://chromedriver.storage.googleapis.com
/2.15/chromedriver_win32.zip…
info Chromedriver Install Writing binary content to C:\Users\CHANDA~1.MUR\AppDat
a\Local\Temp\115930-8408-sk736x\chromedriver_win32.zip…
info Chromedriver Install Extracting C:\Users\CHANDA~1.MUR\AppData\Local\Temp\11
5930-8408-sk736x\chromedriver_win32.zip to C:\Users\CHANDA~1.MUR\AppData\Local\T
emp\115930-8408-sk736x\chromedriver_win32
Invalid or unsupported zip format. No END header found

npm ERR! [email protected] install: node install-npm.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! 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 their info via:
npm ERR! npm owner ls appium-chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command “C:\Program Files\nodejs\\node.exe” “C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js” “install” “-g” “[email protected]
npm ERR! cwd C:\Users\chandan.murali\npm
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

That looks like a hot mess. I’m sorry that’s happening to you. Why don’t we back up a bit–what instructions are you following? I found these & they look pretty good:

https://github.com/appium/appium/blob/master/docs/en/appium-setup/running-on-windows.md

But I don’t have a Windows machine to test out on. If you aren’t following these, post a link to the one you are following & I’ll take a look. Meanwhile it might help to follow these. The instructions don’t look much like what you have said you are doing.

Hi,

Actually I run my scripts in both Windows & iOS using appium. For now I am using Appium 1.3.7. But the problem I am facing is I am not able to execute many[more than 30 ] scripts in Android devices using a windows system. After few minutes it throws a error.

error: Unhandled error: TypeError: Cannot call method ‘shutdown’
of null

at ChromeAndroid.stop

(C:\Users\padmaja.jainkop\AppData\Roaming\npm\node_mod

ules\appium\lib\devices\android\chrome.js:143:20)

at Appium.stop

(C:\Users\padmaja.jainkop\AppData\Roaming\npm\node_modules\ap

pium\lib\appium.js:375:15)

at Appium.timeoutWaitingForCommand

(C:\Users\padmaja.jainkop\AppData\Roaming

\npm\node_modules\appium\lib\appium.js:315:8)

at Timer.listOnTimeout [as ontimeout]

(timers.js:110:15) context: [DELETE /w

d/hub/session/b000286ab1e57a64a513c9d9fb14639f/window {}]

info: [debug] 1 device(s) connected

info: [debug] 1 device(s) connected

info: [debug] executing cmd: adb -s c1607c11f5d26bf devices

Instructions I followed for installation:

  1. Install node.js [v0.10.32]
  2. Installed appium using command
    cd npm
    npm install -g [email protected] [This i installed as I am not able to install v1.4.x]
    npm install wd
  3. Then “appium &” to launch.

Capabilities set are:
DesiredCapabilities capabilitiesAndroid = new DesiredCapabilities();
capabilitiesAndroid.setCapability(“browserName”, “Chrome”);
capabilitiesAndroid.setCapability(“deviceName”, “Android”);
capabilitiesAndroid.setCapability(“platformName”, “Android”);
driver = new RemoteWebDriver(new URL(“http://0.0.0.0:4723/wd/hub”),
capabilitiesAndroid);

Hope installing latest appium version solves my problem.

Please suggest.
Thanks in advance. :blush:

I ran this command on my Mac this morning & it hung for about 5 min. I then ran an ‘npm list’ and got:

/Users/wreed
└── (empty)

Not terribly encouraging. Personally, I use the command:

git clone https://github.com/appium/appium.git

and then I ‘cd node_modules/appium’ and run ‘./reset.sh’. I wonder if something like this would work for you. The above commands would get the latest (1.4.14 as of today).