Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Random EOF errors on OSX #877

Closed
RobinClowers opened this issue Jan 23, 2016 · 9 comments
Closed

Random EOF errors on OSX #877

RobinClowers opened this issue Jan 23, 2016 · 9 comments

Comments

@RobinClowers
Copy link

I'm getting EOF errors on every run, sometimes on a call to within, other times on an to have_content call.

Here are my version numbers:

OSX: 10.11.3
Capybara: 2.5.0
capybara-webkit: 1.7.1
Qt: 5.5.0
WebKit: 538.1
QtWebKit: 5.5.0

Here is a gist of my full log, it's a pretty complex test, sorry. https://gist.github.com/RobinClowers/2e81dff39b441d2b5a21

@brytannia
Copy link

I got the same error.
OSX: 10.11.2
Capybara: 2.5.0
capybara-webkit: 1.7.1

@RobinClowers
Copy link
Author

For the record, I worked around this by blocking our intercom.io script. Not sure why that worked though.

@tmertens
Copy link

tmertens commented Apr 7, 2017

We are also seeing EOFError: end of file reached on a very regular basis in CI (often multiple times a day) when setting a value on a field. We would really like to resolve this asap because it keeps failing our test suite.

Please let me know what we can do to help debug this issue further.

Version info:

Driver version: Capybara: 2.7.1
capybara-webkit: 1.13.0
Qt: 5.5.1
WebKit: 538.1
QtWebKit: 5.5.1

The full capybara-webkit debug log is here: https://gist.github.com/tmertens/777fc15c6bf5973f69506e9c16d3a842

The failure is intermittent in CI and we have been unable to reproduce locally (with same versions of QT/Webkit/C, but when it does occur, it always fails on the same line when attempting to set a value on a field:

date_field.set("#{value}\n")

Here is the stack trace:

# ./vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.13.0/lib/capybara/webkit/connection.rb:41:in `read_nonblock'
# ./vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.13.0/lib/capybara/webkit/connection.rb:41:in `read'
# ./vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.13.0/lib/capybara/webkit/connection.rb:32:in `gets'
# ./vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.13.0/lib/capybara/webkit/browser.rb:315:in `check'
# ./vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.13.0/lib/capybara/webkit/browser.rb:221:in `command'
# ./vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.13.0/lib/capybara/webkit/node.rb:153:in `invoke'
# ./vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.13.0/lib/capybara/webkit/node.rb:47:in `set'
# ./vendor/bundle/ruby/2.2.0/gems/capybara-2.7.1/lib/capybara/node/element.rb:108:in `block in set'
# ./vendor/bundle/ruby/2.2.0/gems/capybara-2.7.1/lib/capybara/node/base.rb:85:in `synchronize'
# ./vendor/bundle/ruby/2.2.0/gems/capybara-2.7.1/lib/capybara/node/element.rb:104:in `set'
# ./spec/support/acceptance/site_prism/avantcredit/global/customer_dashboard/_date_with_calendar_section.rb:12:in `set'
# ./spec/support/acceptance/site_prism/avantcredit/global/customer_dashboard/_payment_form.rb:13:in `fill'
# ./spec/support/acceptance/site_prism/avantcredit/global/customer_dashboard/_fillable_and_submittable_page.rb:4:in `fill'
# ./spec/acceptance/global/customer_dashboard/add_payment_spec.rb:49:in `block (6 levels) in <top (required)>'
# ./vendor/bundle/ruby/2.2.0/gems/site_prism-2.9/lib/site_prism/loadable.rb:56:in `when_loaded'
# ./vendor/bundle/ruby/2.2.0/gems/site_prism-2.9/lib/site_prism/page.rb:34:in `load'
# ./spec/acceptance/global/customer_dashboard/add_payment_spec.rb:43:in `block (5 levels) in <top (required)>'
# ./vendor/bundle/ruby/2.2.0/gems/timecop-0.7.1/lib/timecop/timecop.rb:141:in `travel'
# ./vendor/bundle/ruby/2.2.0/gems/timecop-0.7.1/lib/timecop/timecop.rb:115:in `send_travel'
# ./vendor/bundle/ruby/2.2.0/gems/timecop-0.7.1/lib/timecop/timecop.rb:61:in `travel'
# ./spec/acceptance/global/customer_dashboard/add_payment_spec.rb:42:in `block (4 levels) in <top (required)>'
# ./spec/support/acceptance/config/capybara.rb:57:in `block (2 levels) in <top (required)>'
# ./spec/support/rails/config/database_cleaner.rb:18:in `block (3 levels) in <top (required)>'
# ./spec/support/rails/factory_girl_ext/caching/module_methods.rb:23:in `call'
# ./spec/support/rails/factory_girl_ext/caching/module_methods.rb:23:in `without_caching'
# ./spec/support/rails/config/database_cleaner.rb:17:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:165:in `block (2 levels) in <top (required)>'
# ./spec/support/spec/helpers/time_machine.rb:80:in `run'
# ./spec/support/spec/config/timecop.rb:18:in `block (2 levels) in <top (required)>'
# ./spec/support/rails/locale_switcher/rspec.rb:17:in `block (2 levels) in <top (required)>'

You can see at the end of the log it starts Node.set but never completes it:

Received "Node.findCssWithin"
Started "Node.findCssWithin"
Finished "Node.findCssWithin" with response "Success(59)"
Wrote response true "59"
Received "Node.visible"
Started "Node.visible"
Finished "Node.visible" with response "Success(true)"
Wrote response true "true"
Received "Node.set"
Started "Node.set"

Any assistance with resolving this is greatly appreciated.

@twalpole
Copy link
Collaborator

@tmertens What does your test look like?

@mrjonesbot
Copy link

mrjonesbot commented May 5, 2017

I'm experiencing EOF errors during my CI tests.

https://gist.github.com/mrjonesbot/36bb84ab8e263ebb3c9516fa80c14d4c

@twalpole
Copy link
Collaborator

twalpole commented May 5, 2017

@tmertens Does the "\n" on the end of the value you're setting in the field happen to trigger a page change?

@tmertens
Copy link

tmertens commented May 8, 2017

@twalpole sorry for the late response, I've been preoccupied with other things. I'll check if "\n" triggers an actual page refresh, it is more likely a form submit that triggers some JS side validations and probably rewrites part of the DOM to display an error. In the test, it is submitting the same form twice in a row, both times with invalid data.

@twalpole
Copy link
Collaborator

twalpole commented May 8, 2017

@tmertens Ok - let me know - some of capybara-webkits commands are implemented via JS that is injected into the page, and can cause crashes/hangs if the page/injected JS disappears before the command concludes. If that is the case, not sending the \n but rather clicking elsewhere on the page to trigger the blur may fix the hang

@twalpole
Copy link
Collaborator

twalpole commented Nov 9, 2017

Closing due to lack of response. If someone provides a way to reproduce this issue with the current master branch we can reopen.

@twalpole twalpole closed this as completed Nov 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants