Giter Club home page Giter Club logo

Comments (31)

fwoeck avatar fwoeck commented on June 23, 2024

Hi, I see that too (ruby192, osx1067, guard, spork084) - primarily the very first time after I restarted the spork server. So it's a timing problem probably.
--Frank

from capybara-webkit.

fwoeck avatar fwoeck commented on June 23, 2024

Do you have
$.ajaxSetup({ async: true });
for your tests? See #71
--Frank

from capybara-webkit.

xaviershay avatar xaviershay commented on June 23, 2024

I don't have any JS - I'm testing the following rack application:

class MyApp
  def call(env)
    if env['PATH_INFO'] == '/home'
      [200, {'Content-Type' => 'text/plain'}, ["Hello world!"]]
    else
      [200, {'Content-Type' => 'text/plain'}, [""]]
    end
  end
end

from capybara-webkit.

lazylester avatar lazylester commented on June 23, 2024

I'm seeing a similar problem. Repeatbly, in exactly the same place every time in my test suite. When I bypass webkit and use selenium for the failing test, the broken pipe error occurs on the next webkit test. And if I bypass webkit on that one, the error occurs on the next webkit test.

Broken pipe (Errno::EPIPE)
capybara-webkit-b6a09ee0bf3f/lib/capybara/driver/webkit/browser.rb:45:in `write'
capybara-webkit-b6a09ee0bf3f/lib/capybara/driver/webkit/browser.rb:45:in `puts'
capybara-webkit-b6a09ee0bf3f/lib/capybara/driver/webkit/browser.rb:45:in `command'
capybara-webkit-b6a09ee0bf3f/lib/capybara/driver/webkit/browser.rb:22:in `reset!'
capybara-webkit-b6a09ee0bf3f/lib/capybara/driver/webkit.rb:76:in `reset!'
capybara-1.0.0/lib/capybara/session.rb:70:in `reset!'
capybara-1.0.0/lib/capybara/dsl.rb:74:in `reset_sessions!'
capybara-1.0.0/lib/capybara/dsl.rb:74:in `each'
capybara-1.0.0/lib/capybara/dsl.rb:74:in `reset_sessions!'
capybara-1.0.0/lib/capybara/cucumber.rb:10:in `After'

from capybara-webkit.

bcardarella avatar bcardarella commented on June 23, 2024

Any updates on this?

from capybara-webkit.

sardaukar avatar sardaukar commented on June 23, 2024

Curious about the updates too...

from capybara-webkit.

leehambley avatar leehambley commented on June 23, 2024

just a thought, but how does parallelizing your tests affect capybara webkit, if it forks after capybara webkit server starts, you'll have two clients sharing the same socket, that would result in this failure?

from capybara-webkit.

jasonm avatar jasonm commented on June 23, 2024

I still see this, just tried switching out selenium for capybara-webkit master on a project (one I'm working on with @hgimenez):

  Scenario: A patient with no family history assigned                           # features/user/assign_family_history_to_patient.feature:17
    Then the "VITALS" tab should be active                                      # features/step_definitions/html_steps.rb:48
    When I follow "Social/Family" within the additional info tabs               # features/step_definitions/web_steps.rb:36
    Then the "SOCIAL/FAMILY" tab should be active                               # features/step_definitions/html_steps.rb:48
    And I should see "Assign Now" within the family history section             # features/step_definitions/web_steps.rb:36
    When I follow "Assign Now" within the family history section                # features/step_definitions/web_steps.rb:36
      No response received from the server. (Capybara::Driver::Webkit::WebkitNoResponseError)
      (eval):2:in `click_link'
      ./features/step_definitions/web_steps.rb:58:in `/^(?:|I )follow "([^"]*)"$/'
      features/user/assign_family_history_to_patient.feature:22:in `When I follow "Assign Now" within the family history section'
    Then the "Family History" field should be focused                           # features/step_definitions/form_steps.rb:71
    When I fill in "Family History" with "History of baconizers"                # features/step_definitions/web_steps.rb:61
    And I press "Save"                                                          # features/step_definitions/web_steps.rb:53
    Then I should see "History of baconizers" within the family history section # features/step_definitions/web_steps.rb:36
    And I should not see "Assign Now" within the family history section         # features/step_definitions/web_steps.rb:36
    And I see the edit family history link                                      # features/step_definitions/selector_steps.rb:5
      Broken pipe (Errno::EPIPE)
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/bundler/gems/capybara-webkit-f493b22f6bb5/lib/capybara/driver/webkit/browser.rb:66:in `write'
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/bundler/gems/capybara-webkit-f493b22f6bb5/lib/capybara/driver/webkit/browser.rb:66:in `puts'
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/bundler/gems/capybara-webkit-f493b22f6bb5/lib/capybara/driver/webkit/browser.rb:66:in `command'
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/bundler/gems/capybara-webkit-f493b22f6bb5/lib/capybara/driver/webkit/browser.rb:32:in `reset!'
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/bundler/gems/capybara-webkit-f493b22f6bb5/lib/capybara/driver/webkit.rb:85:in `reset!'
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/gems/capybara-1.0.1/lib/capybara/session.rb:70:in `reset!'
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/gems/capybara-1.0.1/lib/capybara/dsl.rb:74:in `block in reset_sessions!'
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/gems/capybara-1.0.1/lib/capybara/dsl.rb:74:in `each'
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/gems/capybara-1.0.1/lib/capybara/dsl.rb:74:in `reset_sessions!'
      /Users/jason/.rvm/gems/ruby-1.9.2-p290/gems/capybara-1.0.1/lib/capybara/cucumber.rb:10:in `After'

@halogenandtoast @jferris do you guys ever see this on an app?

from capybara-webkit.

jferris avatar jferris commented on June 23, 2024

A broken pipe happens when the webkit_server binary crashes, so it always indicates a bug in capybara-webkit. Unfortunately, it's frequently difficult to find out what actually caused it to crash. What actually happens when you follow "Assign Now" in the above scenario?

from capybara-webkit.

jasonm avatar jasonm commented on June 23, 2024

"Assign Now" is a placeholder link for a set of unassigned attributes on a Patient model. When you click it, the placeholder markup is replaced with an editable form in a Backbone.js view. The link is "#edit-family-history" and click is bound to renderForm in this view: https://gist.github.com/dddd26ba632cdac725ba

from capybara-webkit.

tmaier avatar tmaier commented on June 23, 2024

I have the same problem.

If i run my js: true related specs individually, they pass.
But when I run more then one spec with js: true, the second fails with Errno::EPIPE: Broken pipe

I tried now for one hour to nail it down to a as simple as possible example.
But unfortunately I could not find one.
Even simple examples with just one visit and fill_in tend to fail, but not always.

If there is any way how I can assist you to find the error, I'm happy to help.

from capybara-webkit.

carlhoerberg avatar carlhoerberg commented on June 23, 2024

when using :webkit_debug we don't get these broken pipe errors.. (newly installed ubuntu 11.04 machine, mac os lion no such errors even with the normal :webkit driver)

from capybara-webkit.

tmaier avatar tmaier commented on June 23, 2024

Thank you @carlhoerberg for this hint.

I tried it. The first one still passes, starting from the second one it fails.

[first one omitted]
People
  POST /people/12345/destroy
 >> Visit
 >> 1
 >> 36
 >> http://127.0.0.1:65185/users/sign_in
 << 
 >> Reset
 >> 0
    destroy person (FAILED - 1)

Projects
 >> Visit
 >> Reset
  works (FAILED - 2)
 >> Visit
 >> Reset
  works also (FAILED - 3)

WorkBreakdownStructures
  GET /projects/12345/work_breakdown_structures/12345/destroy
 >> Visit
 >> Reset
    destroy work breakdown structure (FAILED - 4)

Failures:

  1) People POST /people/12345/destroy destroy person
     Failure/Error: login_as user
     Capybara::Driver::Webkit::WebkitNoResponseError:
       No response received from the server.
     # ./spec/support/auth_methods.rb:14:in `login_as'
     # ./spec/requests/people_spec.rb:12:in `block (2 levels) in <top (required)>'

  2) Projects works
     Failure/Error: visit root_path
     Errno::EPIPE:
       Broken pipe
     # ./spec/requests/projects_spec.rb:199:in `block (2 levels) in <top (required)>'

  3) Projects works also
     Failure/Error: visit root_path
     Errno::EPIPE:
       Broken pipe
     # ./spec/requests/projects_spec.rb:210:in `block (2 levels) in <top (required)>'

  4) WorkBreakdownStructures GET /projects/12345/work_breakdown_structures/12345/destroy destroy work breakdown structure
     Failure/Error: login_as user
     Errno::EPIPE:
       Broken pipe
     # ./spec/support/auth_methods.rb:14:in `login_as'
     # ./spec/requests/work_breakdown_structures_spec.rb:8:in `block (2 levels) in <top (required)>'```

from capybara-webkit.

joshuaclayton avatar joshuaclayton commented on June 23, 2024

Also seeing these issues, but there's no rhyme or reason. The test suite's been running for a couple hours fine but then different steps start failing. Running the scenarios individually don't result in the exception.

Running against thoughtbot/capybara-webkit HEAD.

[ ~/dev/project webkitupgrade ✔ ] ps aux | grep webkit_server
joshuaclayton  44486   0.2  0.5  4686236  46064 s002  S     3:29PM   0:21.21 /Users/joshuaclayton/.rvm/gems/ruby-1.9.2-p180/bundler/gems/capybara-webkit-eeeddbd07241/bin/webkit_server
joshuaclayton  50944   0.0  0.6  4686180  50936 s002  S    11:53AM   0:54.49 /Users/joshuaclayton/.rvm/gems/ruby-1.9.2-p180/bundler/gems/capybara-webkit-cc2e9486a0ce/bin/webkit_server
joshuaclayton  82645   0.0  0.0        0      0 s002  Z    10:08AM   0:00.00 (webkit_server)
joshuaclayton  28948   0.0  0.0  2426700    340 s013  S+   11:53AM   0:00.00 grep webkit_server

from capybara-webkit.

jferris avatar jferris commented on June 23, 2024

I think this could be a duplicate of #39. Can you guys try again on 0.7.1? If you keep running into issues, please open a new issue and include output from :webkit_debug.

from capybara-webkit.

tmaier avatar tmaier commented on June 23, 2024

Thank you @jferris, but the update did not solve my issue.
I created a followup issue #181.

from capybara-webkit.

FlaviuSim avatar FlaviuSim commented on June 23, 2024

I was having this issue on 0.6.1 (especially with devise paths (e.g.: visit login_path)).

After upgrading to 0.7.2, the problem was solved. Just an fyi for the people coming to this page like I did.

Thank you for making testing easier.

from capybara-webkit.

enricribas avatar enricribas commented on June 23, 2024

We are still having the same issue with capybara-webkit 0.7.2
Running integration test passes when run individually but fails when an integration test with js=> true runs (and passes) before it.
The test that fails does not have js=>true needed. This second tests fails with 'broken pipe'.

Any ideas greatly appreciated. Thanks.

from capybara-webkit.

iRonin avatar iRonin commented on June 23, 2024

I'm getting Errno::EPIPE: Broken pipe on e39a5c9 but it's working fine on e677cb9

from capybara-webkit.

mhoran avatar mhoran commented on June 23, 2024

@iRonin, this is likely related to the segfaults being discussed in #376. The logging introduced in d9b1898 makes the errors more prevalent. If you run with Qt 4.7.4 the segfaults will likely go away.

from capybara-webkit.

iRonin avatar iRonin commented on June 23, 2024

@mhoran Thanks, I'll try to give it a go :)

from capybara-webkit.

kylewelsby avatar kylewelsby commented on June 23, 2024

Im running QT 4.8.4 and I get

Capybara::Driver::Webkit::WebkitNoResponseError:
       No response received from the server.

then on the next example

Errno::EPIPE:
       Broken pipe

from capybara-webkit.

haarts avatar haarts commented on June 23, 2024

+1
Got the same error as @kylefiedler

from capybara-webkit.

mhoran avatar mhoran commented on June 23, 2024

@kylewelsby, @haarts, please try out the latest master, bca84f9. If you continue to experience segfaults, please follow the instructions in #380.

from capybara-webkit.

haarts avatar haarts commented on June 23, 2024

Rock on. Commenting out font-awesome worked for me. I used http://spin.atomicobject.com/2012/09/05/font-awesome-capybara-webkit/

from capybara-webkit.

kylewelsby avatar kylewelsby commented on June 23, 2024

My setup now

Gemfile
gem 'capybara' #v2.0.1
gem 'capybara-webkit', :git => 'git://github.com/thoughtbot/capybara-webkit.git' # bca84f9

A few tests pass then,

     Capybara::Driver::Webkit::WebkitNoResponseError:
       No response received from the server.

followed by

     Errno::EPIPE:
       Broken pipe

from capybara-webkit.

mhoran avatar mhoran commented on June 23, 2024

@kylewelsby, could you open a new issue? It looks like you're experiencing something different than the others, and I don't want to clutter this thread. Please confirm that you are not using font-awesome. Then, please provide output from the failing scenario with the :webkit_debug driver and follow the instructions in #380 for retrieving a backtrace.

from capybara-webkit.

synth avatar synth commented on June 23, 2024

i might add a possible solution that seems to work for me for the moment. I discovered that there are times after running some specs that fail or crash that there might be lingering(orphaned?) webkit/rspec processes. I continue to get broken pipe while these processes exist even though they're not in the foreground anymore of where I ran them. I use the following command to clear everything out:

ps -ef |egrep 'webkit|rspec' |awk '{print $2}' |xargs kill -9

there's probably a more slick unix command, so feel free to update with a better way...

from capybara-webkit.

nmccready avatar nmccready commented on June 23, 2024

please disregard issue as it is relevant to puma as well

from capybara-webkit.

Dan2552 avatar Dan2552 commented on June 23, 2024

I'm getting this issue on my OS X Mavericks setup. Could this be because homebrew suggested to install QT using --HEAD?

from capybara-webkit.

jeremylynch avatar jeremylynch commented on June 23, 2024

I had a similar issue as described above that I was able to solve by upgrading Qt

from capybara-webkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.