Capybara: Rack application timed out during boot (javascript features)

Created on 7 Mar 2013  路  6Comments  路  Source: teamcapybara/capybara

Hello

I use

gem "capybara", '~> 2.0.1'
gem 'xpath', '~> 1.0.0'
gem 'selenium-webdriver', '~> 2.0'

and default driver beyond README

But When I run js feature with js: true, it raise Rack application timed out during boot

I tried http://docs.tddium.com/troubleshooting/browser-based-integration-tests and google "capybara js Rack application timed out during boot" but no useful solution

Can anyone help me? Heartfelt thanks.

same with https://github.com/jnicklas/capybara/issues/352

All 6 comments

Not an issue. Your application times out during boot, whatever the reason for that is you'll have to investigate yourself.

To be a bit less harsh and more constructive: your application is taking to long to boot. From here, we don't know anything about your application, so we can't really say _why_ it's taking too long. You'll have to investigate yourself through profiling, or whatever, why your app starts so slow, and why it is timing out. Most likely this is not an issue with Capybara. Capybara is used by thousands of people whose apps _don't_ time out during boot.

Yes. our application is slow!

When without js => true, It works.

so the problem is about the feature, maybe the default server boot timeout time is too short?

So Can I change Capybara boot timeout time like https://github.com/jnicklas/capybara/issues/#issuecomment-1495832 for "capybara", '~> 2.0.1'

The timeout is 60s, it used to be configurable, but it isn't anymore, for some reason I can't quite remember. @joliss tinkered with that stuff a while ago, maybe she remembers. Remember that at this point your app is probably already _loaded_ we're only talking about actually _booting_ it, which _should_ be very fast.

I'll try to investigate my app and thinks very much!

I believe we took out the option simply because there is little reason to change it in practice. If someone can show a case of an app legitimately taking longer than 60 seconds to boot (and not just locking up indefinitely), we can revisit that of course.

Was this page helpful?
0 / 5 - 0 ratings