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

Selenium Net::ReadTimeout #518

Closed
jsilvestri opened this issue May 4, 2017 · 1 comment
Closed

Selenium Net::ReadTimeout #518

jsilvestri opened this issue May 4, 2017 · 1 comment

Comments

@jsilvestri
Copy link

jsilvestri commented May 4, 2017

We use teaspoon to test a number of Javascript tests in our Rails app. Recently, it has been timing out with significant frequency. It seems to get a Net::ReadTimeout error when opening the connection to the browser -- line 27 of selenium.rb: https://github.com/jejacks0n/teaspoon/blob/master/lib/teaspoon/driver/selenium.rb#L27

I have noticed others have had Net::ReadTimeout issues before, but I don't know how to use their solutions in Teaspoon:

teamcapybara/capybara#1305
http://stackoverflow.com/a/33898828/2611078

How can I edit the actual selenium driver itself in teaspoon_env.rb? Has anyone else had this issue?

Here is how we instantiate teaspoon:

# run JS unit tests. selenium-webdriver launches FF to run tests inside of
/usr/bin/vncserver :98 -geometry 1600x1200
export DISPLAY=:98
bundle exec teaspoon -f documentation --server-timeout 600 --driver-timeout 600
/usr/bin/vncserver -kill :98

Here is our test log file:

13:47:23 Starting the Teaspoon server...
13:47:23 [655] Puma starting in cluster mode...
13:47:23 [655] * Version 3.6.0 (ruby 2.1.5-p273), codename: Sleepy Sunday Serenity
13:47:23 [655] * Min threads: 1, max threads: 1
13:47:23 [655] * Environment: test
13:47:23 [655] * Process workers: 2
13:47:23 [655] * Preloading application
13:47:23 [655] * Listening on tcp://0.0.0.0:40908
13:47:23 [655] Use Ctrl-C to stop
13:47:23 [655] - Worker 0 (pid: 695) booted, phase: 0
13:47:23 Teaspoon running default suite at http://127.0.0.1:40908/jasmine/default # Using url path to jasmine is a relic of old code
13:47:23 [655] - Worker 1 (pid: 701) booted, phase: 0
13:48:36 [695] ! Detected parent died, dying
13:48:36 /usr/local/lib/ruby/2.1.0/net/protocol.rb:158:in `rescue in rbuf_fill': Net::ReadTimeout (Net::ReadTimeout)
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/protocol.rb:152:in `rbuf_fill'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/protocol.rb:134:in `readuntil'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/protocol.rb:144:in `readline'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/http/response.rb:39:in `read_status_line'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/http/response.rb:28:in `read_new'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/http.rb:1408:in `block in transport_request'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/http.rb:1405:in `catch'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/http.rb:1405:in `transport_request'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/http.rb:1378:in `request'
13:48:36 	from /usr/local/bundle/gems/rest-client-1.6.8/lib/restclient/net_http_ext.rb:51:in `request'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/http.rb:1371:in `block in request'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/http.rb:853:in `start'
13:48:36 	from /usr/local/lib/ruby/2.1.0/net/http.rb:1369:in `request'
13:48:36 	from /usr/local/bundle/gems/rest-client-1.6.8/lib/restclient/net_http_ext.rb:51:in `request'
13:48:36 	from /usr/local/bundle/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/default.rb:107:in `response_for'
13:48:36 	from /usr/local/bundle/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/default.rb:58:in `request'
13:48:36 	from /usr/local/bundle/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
13:48:36 	from /usr/local/bundle/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/bridge.rb:649:in `raw_execute'
13:48:36 	from /usr/local/bundle/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/bridge.rb:627:in `execute'
13:48:36 	from /usr/local/bundle/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/bridge.rb:134:in `get'
13:48:36 	from /usr/local/bundle/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/common/navigation.rb:33:in `to'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/lib/teaspoon/driver/selenium.rb:27:in `run_specs'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/lib/teaspoon/console.rb:55:in `run_specs'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/lib/teaspoon/console.rb:44:in `block in execute_without_handling'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/lib/teaspoon/console.rb:42:in `each'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/lib/teaspoon/console.rb:42:in `inject'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/lib/teaspoon/console.rb:42:in `execute_without_handling'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/lib/teaspoon/console.rb:27:in `execute'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/lib/teaspoon/console.rb:23:in `failures?'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/lib/teaspoon/command_line.rb:15:in `initialize'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/bin/teaspoon:6:in `new'
13:48:36 	from /usr/local/bundle/gems/teaspoon-1.1.1/bin/teaspoon:6:in `<top (required)>'
13:48:36 	from /usr/local/bundle/bin/teaspoon:16:in `load'
13:48:36 	from /usr/local/bundle/bin/teaspoon:16:in `<main>'
13:48:36 [701] ! Detected parent died, dying
13:48:38 Build step 'Execute shell' marked build as failure
@mathieujobin
Copy link
Collaborator

looks like #537 properly fix this issue, please reopen if you disagree

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