I have a Rails App using Angular JS to render the views and I am testing this app with Rspec, Jasmine, and Capybara with PhantomJS as a driver through Poltergeist. Locally all of the tests pass 100% of the time, but occasionally when someone pushes the app and the tests are executed on TravisCI at least one of the javascript tests we have will fail with the following error:
Capybara::Poltergeist::DeadClient:
PhantomJS client died while processing {
"id":"2660b299-8222-43da-a377-abd381d45ce0",
"name":"visit",
"args":["http://127.0.0.1:41235/",30]
}
It's incredibly inconsistent which of the tests will fail, but this is causing the test suite to fail almost every time (again, inconsistently) and prevent our app from auto deploying. I have googled the issue can came across a GitHub issue describing a similar problem, but offered no solution.
The Gem versions are:
Poltergeist - 1.9.0
PhantomJS - 2.1.1.0
Any help is greatly appreciated!