Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EOFError: end of file reached -- all js specs are crashing Capybara with an older Chrome driver

Capybara using Chrome driver with setup:

spec_helper

Capybara.register_driver :chrome do |app|
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
Capybara.javascript_driver = :chrome

I appear to be getting

 EOFError:
   end of file reached

On all of my Javascript tests when I run them with chrome driver.

This appears to have began on or around Oct 27, 2016

Running with poltergeist they work fine.

• also when they crash they appear to open multiple instances of chrome which hang (but do not exit) see http://screencast.com/t/Worwl9d6Iuhr screenshot example

• these appear to affect only my javascript specs (:js => true in Capybara)

• Rebooting my machine did not solve the problem

• My Chrome Mac OS X is currently at 54.0.2840.71

• I'm not sure when sub-sub-point version 71 got released since of course Chrome doesn't tell you or even seem to have it available in some kind of update history. The public information says sub-point version 54.0.2840 was released 2016-10-12 but it doesn't specify when sub-sub-point version 71 was released

• I can reproduce the effect on both my code on master, as well, I have a specific memory of running these specs with Chrome driver earlier in this week, so I am strongly suspecting that Chrome did a sub-sub-point release here and broke this.

if anyone else can confirm I would appreciate it. otherwise, if I find a local problem, I will post answer here.

• Capybara 2.7.1

• selenium-webdriver 2.53.0

• I located the Chromedriver executable in my machine at /usr/local/bin/chromedriver [is this the right one -- I seem to have an older one in /Users/jason/bin/chromedriver ?]

$ which chromedriver /usr/local/bin/chromedriver

$ /usr/local/bin/chromedriver -v ChromeDriver 2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b)

like image 228
Jason FB Avatar asked Oct 28 '16 13:10

Jason FB


1 Answers

Upgrading Chrome Driver to 2.25 solved the issue

to do so via brew

$ brew unlink chromedriver
Unlinking /usr/local/Cellar/chromedriver/2.20... 1 symlinks removed
$ brew install chromedriver
==> Using the sandbox
==> Downloading https://chromedriver.storage.googleapis.com/2.25/chromedriver_mac6
######################################################################## 100.0%
==> Caveats
To have launchd start chromedriver now and restart at login:
  brew services start chromedriver
Or, if you don't want/need a background service you can just run:
  chromedriver
==> Summary
🍺  /usr/local/Cellar/chromedriver/2.25: 4 files, 10.3M, built in 7 seconds
like image 59
Jason FB Avatar answered Sep 28 '22 09:09

Jason FB