Note that there are some explanatory texts on larger screens.

plurals
  1. POCapybara visit gets stuck for no reason
    primarykey
    data
    text
    <p>We have a large cucumber suite for a rails project. It is all capybara and mostly goes via Firefox.</p> <p>Recently we started to experience a failure, that I am struggling to get my head around. Here is what it looks like:</p> <ul> <li>at some point (always the same), capybara <code>visit</code> gets stuck in trying to load the page and capybara eventually times out to find whatever element was looking for (see trace below); every subsequent visit in every other feature also times out;</li> <li>if the feature where it happens run standalone, the problem disappears;</li> <li>if stick debugger (binding.pry) right before the failure, the problem disappears;</li> <li>while it is stuck, if I hit enter in the firefox address bar, request immediately gets through and tests go on and complete without any problems.</li> </ul> <p>One detail that may or may not be relevant: we are using multiple sessions (capybara <code>using_session</code>), so there are three firefox instances by the time of failure. But then again, there are three instances happily passing before that.</p> <p>The same behaviour shows up on my mate's machine.</p> <p>Nothing suspicious in rails logs. No sign of that request that is trying to get through.</p> <p>OSX 10.8.2, ruby 1.9.3, rails 3.2.6, sqlite3, latest capybara/selenium.</p> <p><br></p> <p><strong>Error stack trace:</strong></p> <pre><code> Timeout::Error (Timeout::Error) /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/protocol.rb:132:in `readline' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/http.rb:2551:in `read_new' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/http.rb:1316:in `catch' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/http.rb:1293:in `request' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/http.rb:1286:in `block in request' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/http.rb:745:in `start' /Users/artem/.rbenv/versions/1.9.3-p194-perf/lib/ruby/1.9.1/net/http.rb:1284:in `request' (eval):2:in `has_css?' ./features/step_definitions/home_page_steps.rb:70:in `/^I am taken to the products page on the retailer site$/' features/home_page.feature:21:in `Then I am taken to the products page on the retailer site' Timeout::Error (Timeout::Error) </code></pre> <p><br> <strong>EDIT</strong></p> <p><code>bundle update</code> seems to have made it go away</p> <p><br> <strong>EDIT 2</strong></p> <p>If you stuck with a similar problem and you are using FireBug (capybara/firebug), try disabling it.</p> <p><br> <strong>EDIT 3</strong></p> <p>It's occurred to me that since've we switched from webrick to thin (in test/development), this never happened. It is as simple as adding <code>gem 'thin'</code> in Gemfile. Might be worth a try.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload