Repository: teampoltergeist/poltergeist

Issue #378: TimeoutError - Followed by the rest of my tests failing
Created: 2013-08-20T23:05:30Z
An error occurred in an after hook
  Capybara::Poltergeist::TimeoutError: Timed out waiting for response to {"name":"reset","args":[]}. It's possible that this happened because something took a very long time (for example a page load was slow). If so, setting the Poltergeist :timeout option to a higher value will help (see the docs for details). If increasing the timeout does not help, this is probably a bug in Poltergeist - please report it to the issue tracker.
  occurred at /Users/tom/.rvm/gems/ruby-1.9.3-p429/gems/poltergeist-1.3.0/lib/capybara/poltergeist/web_socket_server.rb:152:in `rescue in send'

The rest of my tests then fail and repeat the same error.
This is odd because I ran the tests locally, they passed.  Then I added highcharts.js and now they're failing.  I'm not even testing what highcharts.js is being used for.

Duplicate issue #505: poltergeist/phantomjs times out, never comes back
Created: 2014-06-12T20:43:03Z
I'm seeing strange timeouts with my test suite, but only in certain environments.  The symptom is that poltergeist times out trying to send a command to phantomjs, and then it's game over, everything after that times out.
  test_0001_do some stuff� [31mERROR�[0m (61.36s)
 Capybara::Poltergeist::TimeoutError:         Timed out waiting for response to {"name":"visit","args":["https://labs-portal-qa.affectiva.com/portal/auth/login"]}.
It's possible that this happened because something took a very long time (for example a page load was slow).
If so, setting the Poltergeist :timeout option to a higher value will help (see the docs for details).
If increasing the timeout does not help, this is probably a bug in Poltergeist - please report it to the issue tracker.
        /home/jenkins/.rvm/gems/ruby-2.1.1/gems/poltergeist-1.5.0/lib/capybara/poltergeist/web_socket_server.rb:87:in `rescue in send'
        /home/jenkins/.rvm/gems/ruby-2.1.1/gems/poltergeist-1.5.0/lib/capybara/poltergeist/web_socket_server.rb:83:in `send'
        /home/jenkins/.rvm/gems/ruby-2.1.1/gems/poltergeist-1.5.0/lib/capybara/poltergeist/server.rb:33:in `send'
        /home/jenkins/.rvm/gems/ruby-2.1.1/gems/poltergeist-1.5.0/lib/capybara/poltergeist/browser.rb:270:in `command'
        /home/jenkins/.rvm/gems/ruby-2.1.1/gems/poltergeist-1.5.0/lib/capybara/poltergeist/browser.rb:29:in `visit'
        /home/jenkins/.rvm/gems/ruby-2.1.1/gems/poltergeist-1.5.0/lib/capybara/poltergeist/driver.rb:89:in `visit'
        /home/jenkins/.rvm/gems/ruby-2.1.1/gems/capybara-2.2.1/lib/capybara/session.rb:197:in `visit'
        /home/jenkins/.rvm/gems/ruby-2.1.1/gems/capybara-2.2.1/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'

The problem happens on this platform: centos 6.5, ruby 2.1.2p95, capybara (2.2.1), poltergeist (1.5.0), phantomjs 1.9.7 64-bit.
On the other hand, I can't make it happen on OSX.

Closing comment (2014-06-12T20:49:25Z): Duplicate of #378, #375, several others. Please look through the existing issues to find the workarounds others have been using. You'll also find some progress toward a patch, and you're more than welcome to help out on that front if you make progress.