Skip to content

Instantly share code, notes, and snippets.

@tfnico
Last active March 1, 2016 16:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfnico/8471223 to your computer and use it in GitHub Desktop.
Save tfnico/8471223 to your computer and use it in GitHub Desktop.
Phantomjs died while running protractor tests
> node_modules/protractor/bin/protractor src/test/js/e2e/protractor_phantom.js
Starting selenium standalone server...
Selenium standalone server started at http://192.168.178.59:51258/wd/hub
F
Failures:
1) homepage should show notification after starting import
Message:
UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
System info: host: 'Thomas-Ferris-Nicolaisens-iMac.local', ip: '192.168.178.59', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.5', java.version: '1.7.0_45'
Driver info: driver.version: EventFiringWebDriver
Stacktrace:
UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
System info: host: 'Thomas-Ferris-Nicolaisens-iMac.local', ip: '192.168.178.59', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.5', java.version: '1.7.0_45'
Driver info: driver.version: EventFiringWebDriver
==== async task ====
WebDriver.navigate().to(about:blank)
at Protractor.get (/Users/tfnico/projects/vplan/dispatcher/node_modules/protractor/lib/protractor.js:519:15)
at null.<anonymous> (/Users/tfnico/projects/vplan/dispatcher/src/test/js/e2e/excel_import_spec.js:28:17)
at /Users/tfnico/projects/vplan/dispatcher/node_modules/protractor/jasminewd/index.js:54:12
at wrapper [as _onTimeout] (timers.js:252:14)
==== async task ====
at null.<anonymous> (/Users/tfnico/projects/vplan/dispatcher/node_modules/protractor/jasminewd/index.js:53:12)
at null.<anonymous> (/Users/tfnico/projects/vplan/dispatcher/node_modules/protractor/node_modules/minijasminenode/lib/async-callback.js:45:37)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
@chefguevara
Copy link

+1 to @barzik approach, I had PhantomJS crashing hard after a test not finding an element by id and giving false negatives all across the board because the browser was down. This lines gave us a workaround the browser crashing and helprf us to get the tests reporing the error properly.

@DonerKebab
Copy link

+1 to @barzik, thank you :)

@artemjackson
Copy link

same here
@barzik solution works fine, thank you

@nkuchipudi
Copy link

+1 to @barzik thank you

@joaoffalcao
Copy link

In fact, @barzik solution solved my problem with the PhantomJS server but now I've resolution issues on my screenshots tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment