Issues with running protractor for angular-phonecat tutorial

5,213 views
Skip to first unread message

nonnycode

unread,
Jun 13, 2014, 9:21:04 AM6/13/14
to ang...@googlegroups.com
I have installing protractor following the steps indicated in the tutorial for the angular-phonecat project.
I get this weird error.

rea51:angular-phonecat nonnycode$ sudo npm run protractor

> angular-...@0.0.0 preprotractor /Users/nonnycode/Documents/lab/angular-phonecat
> npm run update-webdriver


> angular-...@0.0.0 preupdate-webdriver /Users/nonnycode/Documents/lab/angular-phonecat
> npm install

npm WARN cannot run in wd angular-...@0.0.0 bower install (wd=/Users/nonnycode/Documents/lab/angular-phonecat)

> angular-...@0.0.0 update-webdriver /Users/nonnycode/Documents/lab/angular-phonecat
> webdriver-manager update

selenium standalone is up to date.
chromedriver is up to date.

> angular-...@0.0.0 protractor /Users/nonnycode/Documents/lab/angular-phonecat
> protractor test/protractor-conf.js


------------------------------------
PID: 498 (capability: chrome #1)
------------------------------------

Using ChromeDriver directly...
Cannot read property 'matcherFn_' of undefined
[launcher] Runner Process Exited With Error Code: 1

npm ERR! angular-...@0.0.0 protractor: `protractor test/protractor-conf.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular-...@0.0.0 protractor script.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     protractor test/protractor-conf.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "run" "protractor"
npm ERR! cwd /Users/nonnycode/Documents/lab/angular-phonecat
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/nonnycode/Documents/lab/angular-phonecat/npm-debug.log
npm ERR! not ok code 0

Alexander Petty

unread,
Jun 13, 2014, 5:54:06 PM6/13/14
to ang...@googlegroups.com
I too am getting a similar error on Ubuntu 14.04. Here is the output:
--
alex@blackhole9:~/dev/angular-phonecat$ npm run update-webdriver

> angular-...@0.0.0 preupdate-webdriver /home/alex/dev/angular-phonecat
> npm install


> angular-...@0.0.0 postinstall /home/alex/dev/angular-phonecat
> bower install


> angular-...@0.0.0 update-webdriver /home/alex/dev/angular-phonecat
> webdriver-manager update

selenium standalone is up to date.
chromedriver is up to date.
alex@blackhole9:~/dev/angular-phonecat$ npm run protractor

> angular-...@0.0.0 preprotractor /home/alex/dev/angular-phonecat
> npm run update-webdriver


> angular-...@0.0.0 preupdate-webdriver /home/alex/dev/angular-phonecat
> npm install


> angular-...@0.0.0 postinstall /home/alex/dev/angular-phonecat
> bower install


> angular-...@0.0.0 update-webdriver /home/alex/dev/angular-phonecat
> webdriver-manager update

selenium standalone is up to date.
chromedriver is up to date.

> angular-...@0.0.0 protractor /home/alex/dev/angular-phonecat
> protractor test/protractor-conf.js


------------------------------------
PID: 15822 (capability: chrome #1)
------------------------------------

Using ChromeDriver directly...
Cannot read property 'matcherFn_' of undefined
[launcher] Runner Process Exited With Error Code: 1
npm ERR! weird error 1
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
 
npm ERR! not ok code 0
--
Neither
(1)  Creating a soft link node to nodejs
ln -s [the path of nodejs] /usr/bin/node 
or 
(2) Installing the node legacy package
 sudo apt-get install nodejs-legacy. 

worked for me...

Anybody have any ideas on how to fix this?
I'd love to get started using protractor but am blocked by this error that I can't seem to work around.
Let me know.

Thanks,
Alex

nonnycode

unread,
Jun 14, 2014, 3:09:30 AM6/14/14
to ang...@googlegroups.com
I have been able to solve this problem by going into the test directory and running protractor directly.

area51:test nonnycode$ protractor protractor-conf.js
Using ChromeDriver directly...


Finished in 0.005 seconds
0 tests, 0 assertions, 0 failures

area51:test nonnycode$ 

Alexander Petty

unread,
Jun 14, 2014, 8:07:47 AM6/14/14
to ang...@googlegroups.com
When I try that, I get:
--
alex@blackhole9:~/dev/angular-phonecat/test$ protractor protractor-conf.js
Using ChromeDriver directly...
[launcher] Error: Could not find chromedriver at /usr/local/lib/node_modules/protractor/selenium/chromedriver.exe
--
Maybe I need to put "/usr/local/lib/node_modules/protractor/selenium/chromedriver.exe" in my PATH..
I will give that a shot..

-Alex

Joosa Kurvinen

unread,
Jun 14, 2014, 10:36:45 AM6/14/14
to ang...@googlegroups.com
I was getting the same error as OP. I tried then "npm install protactor", after which the error changed to:

Using ChromeDriver directly...
Cannot read property 'matcherFn_' of undefined
[launcher] Runner Process Exited With Error Code: 1

npm ERR! angular-...@0.0.0 protractor: `protractor test/protractor-conf.js`

npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-...@0.0.0 protractor script.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
  ....
npm ERR! not ok code 0


epano...@gmail.com

unread,
Jun 18, 2014, 1:06:51 PM6/18/14
to ang...@googlegroups.com


On Friday, June 13, 2014 4:21:04 PM UTC+3, nonnycode wrote:

The following solution help me:
https://github.com/angular/protractor/issues/906

patl

unread,
Jun 18, 2014, 7:25:33 PM6/18/14
to ang...@googlegroups.com
For me the solution was to downgrade minijasminenode as detailed in http://stackoverflow.com/questions/24217987/end-to-end-testing-with-protractor-giving-error

Mark Lovett

unread,
Apr 5, 2015, 11:57:07 AM4/5/15
to ang...@googlegroups.com
This solution worked for me on OSX 10.9.5

Bolan Oluwa

unread,
May 4, 2015, 9:55:48 AM5/4/15
to ang...@googlegroups.com
I changed the package.json file by by updating protractor to 1.1.1 version from version 1.0.0 and this worked. I actually got the lead from protractor github page. I hope this helps.
Reply all
Reply to author
Forward
0 new messages