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)
@tfnico
Copy link
Author

tfnico commented Jan 17, 2014

Here's the output from the phantomjsdriver.log:

[INFO  - 2014-01-17T10:27:50.345Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
[INFO  - 2014-01-17T10:27:52.185Z] GhostDriver - Main - running on port 10167
[INFO  - 2014-01-17T10:27:52.727Z] Session [0582d630-7f62-11e3-9500-198c7a7e4304] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; PPC Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
[INFO  - 2014-01-17T10:27:52.727Z] Session [0582d630-7f62-11e3-9500-198c7a7e4304] - page.customHeaders:  - {}
[INFO  - 2014-01-17T10:27:52.727Z] Session [0582d630-7f62-11e3-9500-198c7a7e4304] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
[INFO  - 2014-01-17T10:27:52.727Z] Session [0582d630-7f62-11e3-9500-198c7a7e4304] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-10.8 (Mountain Lion)-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
[INFO  - 2014-01-17T10:27:52.727Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 0582d630-7f62-11e3-9500-198c7a7e4304
[INFO  - 2014-01-17T10:28:46.267Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW

Also noticed I have some runaway processes still running phantomjs, so perhaps it's not phantomjs dying as it is somehow escaping from webdriver's control.

@mrvdot
Copy link

mrvdot commented Aug 5, 2014

Did you ever figure this out? Running into the same issue myself. Thanks

@nester999
Copy link

I'm right here with you. Phantom seems to have good days and bad days.

[phantomjs ANY #3] UnknownError: Error communicating with the remote browser. It may have died.
[phantomjs ANY #3] Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'
[phantomjs ANY #3] System info: host: 'els-f25857m', ip: '10.37.51.148', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.3', java.version: '1.7.0_67'
[phantomjs ANY #3] Driver info: driver.version: EventFiringWebDriver

@nwinkler
Copy link

Same here - it's failing on a regular basis for me as well. Sometimes some of the tests work, sometimes the first one fails and stops the whole execution - it's pretty weird.

@cpanato
Copy link

cpanato commented Sep 19, 2014

same here :(

@bitsthatmatter
Copy link

And here. Also on a regular basis but can't predict when.

Copy link

ghost commented Oct 21, 2014

+1 anybody found out what the problem could be?

@petersjay
Copy link

+1 has anyone gotten anywhere with this?

@sameerkat
Copy link

+1 Running into this same issue. Any resolutions?

@krusty
Copy link

krusty commented Nov 7, 2014

[EDIT] I'm sorry I didn't realize I was posting on a project specific thread, but this seems to be more general so I'll leave this here anyway, feel free to delete this comment.

I'm having the same issue, some times tests run fine, some times it crashes after a random amount of them, the only clue I have so far is that it almost never fails on my local dev env, but it fails about 50% of the time on the CI server.

Here's the console output (those same tests run fine in oher builds)


Failures:

  1) Users As Admin While creating a user Should validate the email
   Message:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: RemoteWebDriver
   Stacktrace:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: RemoteWebDriver
==== async task ====
WebElement.click()
    at Array.forEach (native)
==== async task ====
Asynchronous test function: beforeEach()
Error
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:91:33)
Error
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:89:7)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:88:5)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:8:3)

  2) Users As Admin While creating a user Should validate the email
   Message:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
   Stacktrace:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
==== async task ====
WebDriver.executeScript()
    at Object.create.typeFirstName.value (/var/lib/jenkins/workspace/UI/test/e2e/pages/user.page.js:12:60)
==== async task ====
Asynchronous test function: it()
Error
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:95:7)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:88:5)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:8:3)

  3) Users As Admin While creating a user Should validate the first name
   Message:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
   Stacktrace:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
==== async task ====
WebDriver.navigate().to(data:text/html,<html></html>)
    at Object.IndexPage (/var/lib/jenkins/workspace/UI/test/e2e/pages/index.page.js:10:13)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:10:19)
==== async task ====
Asynchronous test function: beforeEach()
Error
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:9:5)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:8:3)
    at Object.<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:5:1)

  4) Users As Admin While creating a user Should validate the first name
   Message:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
   Stacktrace:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
==== async task ====
WebDriver.navigate().to(data:text/html,<html></html>)
    at Object.UsersPage (/var/lib/jenkins/workspace/UI/test/e2e/pages/users.page.js:6:13)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:90:21)
==== async task ====
Asynchronous test function: beforeEach()
Error
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:89:7)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:88:5)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:8:3)

  5) Users As Admin While creating a user Should validate the first name
   Message:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
   Stacktrace:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
==== async task ====
WebDriver.executeScript()
    at Object.create.typeEmail.value (/var/lib/jenkins/workspace/UI/test/e2e/pages/user.page.js:8:52)
==== async task ====
Asynchronous test function: it()
Error
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:112:7)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:88:5)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:8:3)

  6) Users As Admin While creating a user Should validate the last name
   Message:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
   Stacktrace:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
==== async task ====
WebDriver.navigate().to(data:text/html,<html></html>)
    at Object.IndexPage (/var/lib/jenkins/workspace/UI/test/e2e/pages/index.page.js:10:13)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:10:19)
==== async task ====
Asynchronous test function: beforeEach()
Error
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:9:5)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:8:3)
    at Object.<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:5:1)

  7) Users As Admin While creating a user Should validate the last name
   Message:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
   Stacktrace:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
==== async task ====
WebDriver.navigate().to(data:text/html,<html></html>)
    at Object.UsersPage (/var/lib/jenkins/workspace/UI/test/e2e/pages/users.page.js:6:13)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:90:21)
==== async task ====
Asynchronous test function: beforeEach()
Error
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:89:7)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:88:5)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:8:3)

  8) Users As Admin While creating a user Should validate the last name
   Message:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
   Stacktrace:
     UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
==== async task ====
WebDriver.executeScript()
    at Object.create.typeEmail.value (/var/lib/jenkins/workspace/UI/test/e2e/pages/user.page.js:8:52)
==== async task ====
Asynchronous test function: it()
Error
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:129:7)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:88:5)
    at [object Object].<anonymous> (/var/lib/jenkins/workspace/UI/test/e2e/users/users.spec.js:8:3)

Finished in 275.577 seconds
30 tests, 110 assertions, 8 failures

Shutting down selenium standalone server.

/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113
  var template = new Error(this.message);
                 ^
UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'ip-10-0-3-253', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-27-virtual', java.version: '1.7.0_65'
Driver info: driver.version: EventFiringWebDriver
    at new bot.Error (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113:18)
    at Object.bot.response.checkResponse (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:106:9)
    at /var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:319:20
    at /var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
    at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1640:20)
    at notify (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:444:12)
    at notifyAll (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:422:7)
    at resolve (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:400:7)
    at [object Object].fulfill (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:512:5)
    at /var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1507:10
==== async task ====
WebDriver.quit()
    at [object Object].webdriver.WebDriver.schedule (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:302:15)
    at [object Object].webdriver.WebDriver.quit (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:375:21)
    at [object Object].LocalDriverProvider.teardownEnv (/var/lib/jenkins/workspace/UI/node_modules/protractor/lib/driverProviders/local.js:102:16)
    at driverprovider_.setupEnv.then.then.then.then.passed (/var/lib/jenkins/workspace/UI/node_modules/protractor/lib/runner.js:280:35)
    at _fulfilled (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/q/q.js:759:13)
    at /var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/q/q.js:573:44
    at flush (/var/lib/jenkins/workspace/UI/node_modules/protractor/node_modules/q/q.js:108:17)
>> 
>> Test failed but keep the grunt process alive.

And I don't see anything suspicious in the phantom driver log either:

[0] % grep error phantomjsdriver.log 
[DEBUG - 2014-11-07T15:09:13.399Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":142,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:09:19.946Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":294,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:09:25.285Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":446,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:09:32.042Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":599,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:09:42.388Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":752,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:09:47.563Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":904,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:09:52.957Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":1051,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:09:58.065Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":1203,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:10:03.100Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":1350,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:10:08.144Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":1502,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:10:20.434Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":1649,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:10:25.624Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":1801,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:10:30.187Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":1948,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:10:35.438Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":2101,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:10:41.079Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":2254,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:10:45.335Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":203,"errorString":"Error downloading http://localhost:9000/%7B%7B%20creative.url_image_preview%20%7D%7D - server replied: Not Found","id":2270,"url":"http://localhost:9000/{{ creative.url_image_preview }}"}
[DEBUG - 2014-11-07T15:10:48.974Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":2411,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:10:54.510Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":203,"errorString":"Error downloading http://localhost:9000/%7B%7B%20creative.url_image_preview%20%7D%7D - server replied: Not Found","id":2427,"url":"http://localhost:9000/{{ creative.url_image_preview }}"}
[DEBUG - 2014-11-07T15:10:56.557Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":2567,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:11:01.064Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":203,"errorString":"Error downloading http://localhost:9000/%7B%7B%20creative.url_image_preview%20%7D%7D - server replied: Not Found","id":2583,"url":"http://localhost:9000/{{ creative.url_image_preview }}"}
[DEBUG - 2014-11-07T15:11:04.694Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":2724,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:11:10.187Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":2875,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:11:15.448Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":3026,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:11:21.554Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":3178,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:11:30.722Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":3330,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:11:35.928Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":3481,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:11:40.175Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":3628,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:11:45.426Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":3779,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:11:57.196Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":3926,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:12:02.603Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":4078,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:12:07.882Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":4230,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:12:14.415Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":4383,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:12:24.983Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":4536,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:12:30.099Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":4688,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:12:35.243Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":4835,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:12:40.339Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":4987,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:12:45.483Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":5134,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:12:50.392Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":5286,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:13:02.600Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":5433,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:13:07.996Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":5585,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:13:12.696Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":5732,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:13:17.340Z] RouterReqHand - _handle - {"headers":{"Accept-Encoding":"gzip,deflate","Connection":"Keep-Alive","Content-Length":"41","Content-Type":"application/json; charset=utf-8","Host":"localhost:22566","User-Agent":"Apache-HttpClient/4.3.2 (java 1.5)"},"httpVersion":"1.1","method":"POST","post":"{\"using\":\"css selector\",\"value\":\".error\"}","url":"/session/079d2360-6690-11e4-9e76-d55c02c208df/elements","urlParsed":{"anchor":"","query":"","file":"elements","directory":"/session/079d2360-6690-11e4-9e76-d55c02c208df/","path":"/session/079d2360-6690-11e4-9e76-d55c02c208df/elements","relative":"/session/079d2360-6690-11e4-9e76-d55c02c208df/elements","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/session/079d2360-6690-11e4-9e76-d55c02c208df/elements","queryKey":{},"chunks":["session","079d2360-6690-11e4-9e76-d55c02c208df","elements"]}}
[DEBUG - 2014-11-07T15:13:17.341Z] WebElementLocator - _find.locator - {"using":"css selector","value":".error"}
[DEBUG - 2014-11-07T15:13:17.351Z] WebElementLocator - _locateElements.locator - {"using":"css selector","value":".error"}
[DEBUG - 2014-11-07T15:13:18.685Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":5875,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:13:23.722Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":6025,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:13:29.821Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":6175,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:13:35.242Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":6327,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:13:41.104Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":6479,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:13:47.455Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":6632,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:14:00.910Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":6785,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:14:08.798Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":6938,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:14:14.126Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":7090,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:14:21.002Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":7237,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:14:26.082Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":7389,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:14:33.263Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":7536,"url":"http://localhost:35730/livereload.js?snipver=1"}
[DEBUG - 2014-11-07T15:14:38.356Z] Session [079d2360-6690-11e4-9e76-d55c02c208df] - page.onResourceError - {"errorCode":1,"errorString":"Connection refused","id":7688,"url":"http://localhost:35730/livereload.js?snipver=1"}

@jberube
Copy link

jberube commented Jan 30, 2015

Any development with this issue?

I have the same issue on
-Windows 7 64

  • Protractor 1.6.1 (run either through grunt-protractor-runner 1.2.1 or directly in shell)
  • Selenium 2.43.1
  • PhantomJS 1.9.8

Protractor outputs:

UnknownError: Error communicating with the remote browser. It may have died.
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'MCAW7016', ip: '192.168.35.173', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_51'
Driver info: driver.version: EventFiringWebDriver
    at new bot.Error (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:109:18)
    at Object.bot.response.checkResponse (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\response.js:106:9)
    at c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:277:20
    at c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\base.js:1243:15
    at webdriver.promise.ControlFlow.runInNewFrame_ (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1539:20)
    at notify (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:362:12)
    at notifyAll (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:331:7)
    at resolve (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:309:7)
    at fulfill (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:429:5)
    at c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1406:10
==== async task ====
WebDriver.quit()
    at webdriver.WebDriver.schedule (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:268:15)
    at webdriver.WebDriver.quit (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:333:21)
    at HostedDriverProvider.teardownEnv (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\lib\driverProviders\hosted.js:38:16)
    at driverprovider_.setupEnv.then.then.then.then.passed (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:264:35)
    at _fulfilled (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:797:54)
    at self.promiseDispatch.done (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:826:30)
    at Promise.promise.promiseDispatch (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:759:13)
    at c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:573:44
    at flush (c:\Users\jberube\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:108:17)

@GuyMograbi
Copy link

+1 me too. same issue.

@glennypagaduan
Copy link

Any development with this issue? I have the same issue

@barzik
Copy link

barzik commented Sep 10, 2015

Try this one - in the beforeEach:
browser.ignoreSynchronization = true; browser.get('/'); browser.waitForAngular();

@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