thoughtbot / capybara-webkit

A Capybara driver for headless WebKit to test JavaScript web apps
https://thoughtbot.com/open-source
MIT License
1.97k stars 427 forks source link

Getting EOFError with `visit` #782

Closed Hainish closed 7 years ago

Hainish commented 9 years ago

Apologies if this is a duplicate of #777. I'm getting this for capybara-webkit >= 1.3.0, <= 1.5.1, master. Haven't tested earlier versions. I'm running this on a headless server with xvfb

Stack trace with 1.3.0:

2.2.0 :001 > session = Capybara::Session.new :webkit                
 => #<Capybara::Session> 
2.2.0 :002 > session.visit("http://www.mikulski.senate.gov/contact")
EOFError: end of file reached
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/capybara-webkit-1.3.0/lib/capybara/webkit/connection.rb:49:in `read_nonblock'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/capybara-webkit-1.3.0/lib/capybara/webkit/connection.rb:49:in `read'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/capybara-webkit-1.3.0/lib/capybara/webkit/connection.rb:40:in `gets'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/capybara-webkit-1.3.0/lib/capybara/webkit/browser.rb:269:in `check'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/capybara-webkit-1.3.0/lib/capybara/webkit/browser.rb:208:in `command'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/capybara-webkit-1.3.0/lib/capybara/webkit/browser.rb:18:in `visit'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/capybara-webkit-1.3.0/lib/capybara/webkit/driver.rb:29:in `visit'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/capybara-2.4.4/lib/capybara/session.rb:227:in `visit'
        from (irb):2
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/padrino-core-0.12.5/lib/padrino-core/cli/base.rb:40:in `console'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/padrino-core-0.12.5/bin/padrino:9:in `<top (required)>'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bin/padrino:23:in `load'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bin/padrino:23:in `<main>'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bin/ruby_executable_hooks:15:in `eval'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bin/ruby_executable_hooks:15:in `<main>'2.2.0 :003 > 

Stack trace with master:

2.2.0 :060 >   session = Capybara::Session.new :webkit
 => #<Capybara::Session>
2.2.0 :061 > session.visit("http://www.mikulski.senate.gov/contact")
WARNING: The next major version of capybara-webkit will require at least version 5.0 of Qt. You're using version 4.8.6.
Request to unknown URL: http://www.mikulski.senate.gov/contact
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/contact")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://fast.fonts.net/jsapi/c01896be-b088-431c-b6bc-6b74b02febda.js
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://fast.fonts.net/jsapi/c01896be-b088-431c-b6bc-6b74b02febda.js")
To allow requests to URLs from this host:
  page.driver.allow_url("fast.fonts.net")
Request to unknown URL: http://www.mikulski.senate.gov/themes/default_v2/styles/bootstrap.css?cachebuster=1412247007
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/default_v2/styles/bootstrap.css?cachebuster=1412247007")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/themes/mikulski/styles/common.css?cachebuster=1422373725
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/mikulski/styles/common.css?cachebuster=1422373725")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://platform.twitter.com/widgets.js
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://platform.twitter.com/widgets.js")
To allow requests to URLs from this host:
  page.driver.allow_url("platform.twitter.com")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/jquery/jquery.js?cachebuster=1412247434
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/jquery/jquery.js?cachebuster=1412247434")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/themes/default_v2/scripts/bootstrap.min.js
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/default_v2/scripts/bootstrap.min.js")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/orientation.js?cachebuster=1412247527
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/orientation.js?cachebuster=1412247527")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/mootools/mootools.js?cachebuster=1412247526
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/mootools/mootools.js?cachebuster=1412247526")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/mootools/mootools-more.js?cachebuster=1412247525
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/mootools/mootools-more.js?cachebuster=1412247525")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/bookmark_bubble/bookmark_bubble.js?cachebuster=1412247351
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/bookmark_bubble/bookmark_bubble.js?cachebuster=1412247351")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/bookmark_bubble/senate_bubble.js?cachebuster=1412247352
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/bookmark_bubble/senate_bubble.js?cachebuster=1412247352")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/modernizr/modernizr.js?cachebuster=1412247524
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/modernizr/modernizr.js?cachebuster=1412247524")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/selectivizr/selectivizr.js?cachebuster=1412247533
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/selectivizr/selectivizr.js?cachebuster=1412247533")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/themes/mikulski/scripts/vendor/bootstrap/bootstrap-select.js?cachebuster=1412249586
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/mikulski/scripts/vendor/bootstrap/bootstrap-select.js?cachebuster=1412249586")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/twitterfeed/twitter-post-fetcher.js?cachebuster=1412247767
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/twitterfeed/twitter-post-fetcher.js?cachebuster=1412247767")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/themes/mikulski/scripts/jquery.backgroundSize.js
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/mikulski/scripts/jquery.backgroundSize.js")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/themes/mikulski/scripts/global.js
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/mikulski/scripts/global.js")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/wt_sdc/mikulski_webtrends.js
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/wt_sdc/mikulski_webtrends.js")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/popover-extended.js?cachebuster=1412247025
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/popover-extended.js?cachebuster=1412247025")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/scripts/vendor/jquery/jquery.validate.js?cachebuster=1412247435
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/scripts/vendor/jquery/jquery.validate.js?cachebuster=1412247435")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/themes/mikulski/images/logo.png
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/mikulski/images/logo.png")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/images/ajax-loader.gif
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/images/ajax-loader.gif")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/themes/mikulski/images/footer/map-transparent.png
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/mikulski/images/footer/map-transparent.png")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://fast.fonts.net/t/1.css?apiType=js&projectid=c01896be-b088-431c-b6bc-6b74b02febda
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://fast.fonts.net/t/1.css?apiType=js&projectid=c01896be-b088-431c-b6bc-6b74b02febda")
To allow requests to URLs from this host:
  page.driver.allow_url("fast.fonts.net")
Request to unknown URL: http://www.mikulski.senate.gov/themes/mikulski/images/footer/icon-minus.png
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/mikulski/images/footer/icon-minus.png")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://www.mikulski.senate.gov/themes/mikulski/images/footer/googleTrans.png
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://www.mikulski.senate.gov/themes/mikulski/images/footer/googleTrans.png")
To allow requests to URLs from this host:
  page.driver.allow_url("www.mikulski.senate.gov")
Request to unknown URL: http://sdc1.senate.gov/dcsh3dc9j7iyw688hmwfk3x9c_8k3k/wtid.js
To block requests to unknown URLs:
  page.driver.block_unknown_urls
To allow just this URL:
  page.driver.allow_url("http://sdc1.senate.gov/dcsh3dc9j7iyw688hmwfk3x9c_8k3k/wtid.js")
To allow requests to URLs from this host:
  page.driver.allow_url("sdc1.senate.gov")
EOFError: end of file reached
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bundler/gems/capybara-webkit-179ca5b6daa2/lib/capybara/webkit/connection.rb:55:in `read_nonblock'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bundler/gems/capybara-webkit-179ca5b6daa2/lib/capybara/webkit/connection.rb:55:in `read'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bundler/gems/capybara-webkit-179ca5b6daa2/lib/capybara/webkit/connection.rb:46:in `gets'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bundler/gems/capybara-webkit-179ca5b6daa2/lib/capybara/webkit/browser.rb:287:in `check'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bundler/gems/capybara-webkit-179ca5b6daa2/lib/capybara/webkit/browser.rb:210:in `command'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bundler/gems/capybara-webkit-179ca5b6daa2/lib/capybara/webkit/browser.rb:18:in `visit'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bundler/gems/capybara-webkit-179ca5b6daa2/lib/capybara/webkit/driver.rb:42:in `visit'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/capybara-2.4.4/lib/capybara/session.rb:227:in `visit'
        from (irb):61
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/padrino-core-0.12.5/lib/padrino-core/cli/base.rb:40:in `console'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/gems/padrino-core-0.12.5/bin/padrino:9:in `<top (required)>'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bin/padrino:23:in `load'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bin/padrino:23:in `<main>'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bin/ruby_executable_hooks:15:in `eval'
        from /home/phantomdc/.rvm/gems/ruby-2.2.0@phantom-dc/bin/ruby_executable_hooks:15:in `<main>'2.2.0 :062 >
aramprice commented 9 years ago

Could this be similar to the issue[1] we are seeing with v1.5.1 (but not v1.5.0)?

[1] https://github.com/thoughtbot/capybara-webkit/issues/535#issuecomment-106643767

Hainish commented 9 years ago

@aramprice I do encounter this with v1.5.0. Are you able to reproduce the error?

aramprice commented 9 years ago

@Hainish - we have only seen this with v1.5.0. We are on OS X 10.10.4 using brew installed qt v4.8.6

There are more details in #535.

aram

jferris commented 9 years ago

I just released 1.5.2 with some crash fixes. Can you give that a try?

aramprice commented 9 years ago

That seems to have resolved it, see https://github.com/thoughtbot/capybara-webkit/issues/535#issuecomment-110079824

calleluks commented 9 years ago

@Hainish Can you confirm whether version 1.5.2 resolves this issue or not?

chamnap commented 9 years ago

I faced this problem with qt5 and capybara-webkit 1.6.0. It runs on a headless Ubuntu 14.04 instance. Totally okay on my mac os 10.10.

EOFError: end of file reached
    from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/capybara-webkit-1.6.0/lib/capybara/webkit/connection.rb:55:in `read_nonblock'
    from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/capybara-webkit-1.6.0/lib/capybara/webkit/connection.rb:55:in `read'
    from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/capybara-webkit-1.6.0/lib/capybara/webkit/connection.rb:46:in `gets'
    from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/capybara-webkit-1.6.0/lib/capybara/webkit/browser.rb:299:in `check'
    from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/capybara-webkit-1.6.0/lib/capybara/webkit/browser.rb:211:in `command'
    from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/capybara-webkit-1.6.0/lib/capybara/webkit/browser.rb:19:in `visit'
    from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/capybara-webkit-1.6.0/lib/capybara/webkit/driver.rb:48:in `visit'
    from /home/ubuntu/.rvm/gems/ruby-2.1.5/gems/capybara-2.4.4/lib/capybara/session.rb:227:in `visit'

Any ideas? It's a random failure.

Octowl commented 9 years ago

I'm currently facing this problem with qt 5.2.1 using capybara-webkit 1.5.2 and running it on a headless Ubuntu 14.04.2 instance

EOFError: end of file reached
/var/lib/gems/1.9.1/gems/capybara-webkit-1.5.2/lib/capybara/webkit/connection.rb:49:in `read_nonblock'
/var/lib/gems/1.9.1/gems/capybara-webkit-1.5.2/lib/capybara/webkit/connection.rb:49:in `read'
/var/lib/gems/1.9.1/gems/capybara-webkit-1.5.2/lib/capybara/webkit/connection.rb:40:in `gets'
/var/lib/gems/1.9.1/gems/capybara-webkit-1.5.2/lib/capybara/webkit/browser.rb:283:in `check'
/var/lib/gems/1.9.1/gems/capybara-webkit-1.5.2/lib/capybara/webkit/browser.rb:210:in `command'
/var/lib/gems/1.9.1/gems/capybara-webkit-1.5.2/lib/capybara/webkit/browser.rb:18:in `visit'
/var/lib/gems/1.9.1/gems/capybara-webkit-1.5.2/lib/capybara/webkit/driver.rb:41:in `visit'
/var/lib/gems/1.9.1/gems/capybara-2.4.0/lib/capybara/session.rb:226:in `visit'
/var/lib/gems/1.9.1/gems/capybara-2.4.0/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
/root/Content/lib/tasks/instagram.rake:35:in `block (3 levels) in <top (required)>'
/var/lib/gems/1.9.1/gems/activerecord-4.0.0/lib/active_record/relation/delegation.rb:13:in `each'
/var/lib/gems/1.9.1/gems/activerecord-4.0.0/lib/active_record/relation/delegation.rb:13:in `each'
/root/Content/lib/tasks/instagram.rake:32:in `block (2 levels) in <top (required)>'

Same code runs fine locally on my Mac OSX 10.10.4 Could this be a regression?

Hainish commented 9 years ago

I've created a docker image for this issue. See https://github.com/Hainish/capybara-webkit-782

Interestingly, if I change the FROM image from ubuntu to debian, I no longer encounter this error. So this looks to be ubuntu-specific, at least in this instance.

chamnap commented 9 years ago

Any updates on this?

klausmeyer commented 9 years ago

:+1: We're also having this issue in our travis-ci setup:

root@90e4d336f4e3:/# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise
root@90e4d336f4e3:/# qmake -v
QMake version 3.0
Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu
root@90e4d336f4e3:/# 

capybara-webkit version 1.6.0

galaydaroman commented 9 years ago

I had the same issue with capybara-webkit . My environment is:

And I have tried with capybara-webkit versions 1.4.1, 1.5.0, 1.6.0. After deep investigations I have found that capybara-webkit in debug mode shows me a lot of error related to lib gstreamer. Sorry, but I could not provide this debug for now.

Anyway I have resolve this issue with installing additional packeges:

apt-get install gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x

Please, let me know if it helps. Thanks

aguynamedben commented 9 years ago

I got the same error using capybara-webkit 1.7.0 and qt 5.5.0 (from homebrew).

I rebuilt capybara-webkit with qt4, which seemed to resolve it on my local OS X...

    gem uninstall capybara-webkit (selected "Remove all versions")
    brew uninstall qt5
    brew install qt4 (qt 4.8.7 was installed)
    bundle
TheLonelyGhost commented 9 years ago

I got the same error using capybara-webkit 1.7.0 and qt 5.2.1.

me@mymachine:~$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:        14.04
Codename:       trusty

I tried the following without success:

ktopping commented 9 years ago

https://github.com/galaydaroman's fix, above, https://github.com/thoughtbot/capybara-webkit/issues/782#issuecomment-132461373 fixes the issue for me. I have a similar setup, only a different version of Qt: Docker Unbuntu:14.04 xvfb capybara-webkit-1.5.0 qt 4.8.6

JimmySticks2001 commented 9 years ago

galaydaroman's fix corrected this problem for me as well.

klausmeyer commented 9 years ago

I can also confirm that it seems to work for me. Thanks @galaydaroman :+1:

galaydaroman commented 9 years ago

No problem. Thanks for your response guys

jferris commented 9 years ago

Looks like gstreamer might be required for QtWebKit now? It looks like I have it installed locally as a dependency for something else.

carols10cents commented 8 years ago

I added the gstreamer libs to the section of the wiki on installing QtWebKit on Ubuntu -- please let me know or correct it if I've misstated anything, but this seems to be solving my problems!! :)

halo commented 8 years ago

Indeed, I had these issues on CircleCI on Ubuntu Trusty (no capybara spec would pass):

...and this circle.yml fixed it all:

machine:
  pre:
    - sudo apt-get install gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x

Environment:

Capybara: 2.7.1
capybara-webkit: 1.11.1
Qt: 5.2.1
WebKit: 537.21
QtWebKit: 5.1.1
pointblack commented 7 years ago

hi, problem on my application was with to many asset files. After adding to spec/rails_helper.rb

config.before(:suite) do
    system('rake assets:precompile')
    DatabaseCleaner.strategy = :truncation
end

config.after(:suite) do
  system('rm -rf public/assets')
end

i could fix the issue

Dimcha commented 7 years ago

I had similar issue. EOFError: end of file reached + Broken pipe when used visit but only on some pages. The problem was very simple, I had javascript error on those pages, and it was causing CrashError in capybara-webkit.

longwave commented 7 years ago

I was getting EOFError on one server but not another, both running Ubuntu 14.04 with the same gem and Qt versions.

@galaydaroman 's fix in https://github.com/thoughtbot/capybara-webkit/issues/782#issuecomment-132461373 pointed me in the right direction - one server didn't have the gstreamer packages installed, after installing these and rebuilding the gems the error went away.

lvonk commented 7 years ago

@Dimcha did you find a solution, we are facing a similar issue.

twalpole commented 7 years ago

Closing due to age and that comments seem to indicate this was due to system config issues. If this is still an issue with current releases we can reopen when a way to replicate is provided