Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capybara-webkit EOF error and server crashing when mocking with puffing-billy #176

Closed
lukegrecki opened this issue Oct 17, 2016 · 2 comments

Comments

@lukegrecki
Copy link

I am currently using capybara-webkit (1.11.1) with puffing_billy (0.8.0) to make mock requests from javascript, and am consistently running into the following error:

1) Analytics Dashboard when the user visits analytics dashboard today's summary details are visible
     Got 0 failures and 2 other errors:

     1.1) Failure/Error: visit analytics_dashboard_path

          EOFError:
            end of file reached
          # <internal:prelude>:76:in `__read_nonblock'
          # <internal:prelude>:76:in `read_nonblock'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/connection.rb:41:in `read'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/connection.rb:32:in `gets'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/browser.rb:299:in `check'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/browser.rb:211:in `command'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/browser.rb:19:in `visit'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/driver.rb:50:in `visit'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-2.7.1/lib/capybara/session.rb:233:in `visit'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-2.7.1/lib/capybara/dsl.rb:52:in `block (2 levels) in <module:DSL>'
          # ./spec/features/analytics/dashboard_integration_spec.rb:139:in `load_analytics_dashboard'
          # ./spec/features/analytics/dashboard_integration_spec.rb:276:in `block (3 levels) in <top (required)>'
          # ./spec/ui_spec_helper.rb:53:in `block (2 levels) in <top (required)>'

     1.2) Failure/Error: example.run

          Capybara::Webkit::CrashError:
            The webkit_server process crashed!

              Connection reset by peer

            This is a bug in capybara-webkit. For help with this crash, please visit:

            https://github.com/thoughtbot/capybara-webkit/wiki/Reporting-Crashes
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/browser.rb:215:in `rescue in command'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/browser.rb:205:in `command'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/browser.rb:79:in `current_url'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-webkit-1.11.1/lib/capybara/webkit/driver.rb:46:in `current_url'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-2.7.1/lib/capybara/session.rb:181:in `current_url'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-screenshot-1.0.13/lib/capybara-screenshot/rspec.rb:55:in `block in after_failed_example'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-2.7.1/lib/capybara.rb:352:in `using_session'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-screenshot-1.0.13/lib/capybara-screenshot/rspec.rb:54:in `after_failed_example'
          # /Users/lukegrecki/.rvm/gems/ruby-2.3.1@backoffice/gems/capybara-screenshot-1.0.13/lib/capybara-screenshot/rspec.rb:84:in `block (2 levels) in <top (required)>'
          # ./spec/ui_spec_helper.rb:53:in `block (2 levels) in <top (required)>'
          # ------------------
          # --- Caused by: ---
          # Errno::ECONNRESET:
          #   Connection reset by peer
          #   <internal:prelude>:76:in `__read_nonblock'

To give a little more context I'm stubbing about 8 requests total and these may be coming in rather fast. The first set of 4 requests are options requests, and the second set of 4 requests have the same urls as the first but are get requests asking for data.

I wasn't sure if this was a capybara-webkit issue or a puffing-billy one so I also opened an issue in the former repo.

I know puffing-billy doesn't parallelize the processing of mock requests. Could too many ajax requests coming into capybara-webkit + puffing-billy cause a crash? Any ideas how to work around this?

I appreciate any help or direction.

@ronwsmith
Copy link
Collaborator

ronwsmith commented Oct 19, 2016

I haven't heard of something like this before.

Does everything work as expected using webkit without puffing-billy?

@lukegrecki
Copy link
Author

This turned out to be an issue locally for me (still unsolved) but it passes locally consistently for someone else on the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants