Reputation: 87
I am facing a problem when starting webdriver-manager in node_modules\protractor with windows 7. the command is :
node webdriver-manager start
Then I got the following error messages:
seleniumProcess.pid: undefined
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1028:32)
at child_process.js:1109:20
at process._tickCallback (node.js:343:11)
at Function.Module.runMain (module.js:492:11)
at startup (node.js:124:16)
at node.js:807:3
After searching on the Internet, I cannot find any similar question like mine that the seleniumProcess.pid is undefined.
Following is the output for java -version:
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Any idea?
Upvotes: 4
Views: 5905
Reputation: 1
Try to add C:\Windows\System32\ there (right-click My Computer -> Properties -> Advanced system settings -> Environment Variables -> Edit...
PATH and add C:\Windows\System32
to the end (with a semi-colon separating each variable).
Upvotes: 0
Reputation: 31
Error: C:\XXXX\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriv er-manager\bin>webdriver-manager --verbose update
events.js:160 throw er; // Unhandled 'error' event ^
Error: unable to verify the first certificate at Error (native) at TLSSocket. (_tls_wrap.js:1092:38) at emitNone (events.js:86:13) at TLSSocket.emit (events.js:185:7) at TLSSocket._finishInit (_tls_wrap.js:610:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
I did the following to remove this:
Try: 1. C:\XX\Roaming\npm\node_modules\protractor\node_modules\webdriv er-manager\bin>webdriver-manager --proxy http://username:passwd@IP:port 080/ update (Then it updated drivers in the location)
webdriver-manager status
C:\XX\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\bin>webdriver-manager --verbose start
It is started working, I expect this is happening repeatedly due to corruption of drivers. May we need to graceful stop to work.
Upvotes: 0
Reputation: 8067
Ok, I figured out why I had this problem. You have only JRE, but
You will need to have the Java Development Kit (JDK) installed to run the standalone Selenium Server. Check this by running java -version from the command line. Tutorial
On Ubuntu I've done
$ sudo apt-get install openjdk-7-jdk
And now I have this Java:
$ java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.15.10.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
And webdriver-manager start
works.
Upvotes: 3