SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

Error occurs when launching Safari 5.1.7 with Watir. #5709

Open lukeis opened 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 5709

I have downloaded the Apple Developer certificate and also configured the Safari Extension
(Webdriver 2.28.0).

When I enter the following in the terminal:
irb
1.9.3p392 :001 > require "watir-webdriver"
 => true 
1.9.3p392 :002 > browser = Watir::Browser.new :safari

The following error appears:

Errno::ECONNRESET: Connection reset by peer
    from /.rvm/gems/ruby-1.9.3-p392/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/server.rb:37:in
`read_nonblock'
    from /.rvm/gems/ruby-1.9.3-p392/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/server.rb:37:in
`receive'
    from /Users/RTL/.rvm/gems/ruby-1.9.3-p392/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/bridge.rb:67:in
`raw_execute'
    from .rvm/gems/ruby-1.9.3-p392/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/bridge.rb:47:in
`create_session'
    from /.rvm/gems/ruby-1.9.3-p392/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:68:in
`initialize'
    from /.rvm/gems/ruby-1.9.3-p392/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/bridge.rb:29:in
`initialize'
    from /.rvm/gems/ruby-1.9.3-p392/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:47:in
`new'
    from /.rvm/gems/ruby-1.9.3-p392/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:47:in
`for'
    from /.rvm/gems/ruby-1.9.3-p392/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver.rb:67:in
`for'
    from /.rvm/gems/ruby-1.9.3-p392/gems/watir-webdriver-0.6.2/lib/watir-webdriver/browser.rb:46:in
`initialize'
    from (irb):2:in `new'
    from (irb):2
    from /.rvm/rubies/ruby-1.9.3-p392/bin/irb:16:in `<main>'

Note: When I update Safari 5.1.7 to 6.0.4, the error no longer occurs and it seems
to function as expected. 

Selenium version: selenium-webdriver: 2.33.0
OS: Mac OS 10.7.5
Browser: Safari
Browser version: 5.1.7
watir (4.0.2)
watir-webdriver (0.6.2)

Reported by rjjestrada on 2013-05-29 19:47:58

lukeis commented 8 years ago

Reported by barancev on 2013-05-30 08:48:39

lukeis commented 8 years ago

Reported by barancev on 2013-05-30 08:48:49

lukeis commented 8 years ago
Hi, 

I have the same issue, did you find a way to fix it?

Thanks

Reported by laurenthavas on 2013-06-10 17:40:39

lukeis commented 8 years ago
Sorry, haven't been able to find any way to fix it yet.

Reported by rjjestrada on 2013-06-10 20:32:08

lukeis commented 8 years ago
Please run the script with $DEBUG = true (or pass -d to Ruby on the command line) and
attach the full output to this issue.

Reported by jari.bakken on 2013-06-11 20:09:27

lukeis commented 8 years ago
Here is it, I don't have exactly the same Ruby version: 

/Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/server.rb:37:in
`read_nonblock': Connection reset by peer (Errno::ECONNRESET)
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/server.rb:37:in
`receive'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/bridge.rb:67:in
`raw_execute'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/bridge.rb:47:in
`create_session'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:68:in
`initialize'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/bridge.rb:29:in
`initialize'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:47:in
`new'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:47:in
`for'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver.rb:67:in
`for'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/watir-webdriver-0.6.4/lib/watir-webdriver/browser.rb:46:in
`initialize'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/watir-4.0.2/lib/watir/loader.rb:16:in
`new'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/watir-4.0.2/lib/watir/loader.rb:16:in
`new'
    from exkad.rb:46:in `<main>'

Thanks for your help

Reported by laurenthavas on 2013-06-11 21:15:16

lukeis commented 8 years ago
Please read comment #5 again :)

Reported by jari.bakken on 2013-06-12 18:07:00

lukeis commented 8 years ago
I did pass the -d to ruby... 

This time I tried to add $DEBUG = true to my code. Does this output make more sense?

Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
- no such file to load -- roo
Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
- no such file to load -- watir
Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
- no such file to load -- watir/loader
Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
- no such file to load -- pismo
Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
- no such file to load -- websocket-native
Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:63
- no such file to load -- websocket-native
handshake complete, v75
Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
- no such file to load -- oj
Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:63
- no such file to load -- oj
Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
- no such file to load -- yajl
Exception `LoadError' at /Users/qa/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:63
- no such file to load -- yajl
Using c extension for JSON.
>>> {"origin":"webdriver","type":"command","command":{"id":"1","name":"newSession","parameters":{"desiredCapabilities":{"browserName":"safari","version":"","platform":"ANY","javascriptEnabled":true,"cssSelectorsEnabled":true,"takesScreenshot":true,"nativeEvents":false,"rotatable":false}}}}
Exception `Errno::ECONNRESET' at /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/server.rb:37
- Connection reset by peer
/Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/server.rb:37:in
`read_nonblock': Connection reset by peer (Errno::ECONNRESET)
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/server.rb:37:in
`receive'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/bridge.rb:67:in
`raw_execute'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/bridge.rb:47:in
`create_session'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:68:in
`initialize'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/safari/bridge.rb:29:in
`initialize'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:47:in
`new'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:47:in
`for'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver.rb:67:in
`for'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/watir-webdriver-0.6.4/lib/watir-webdriver/browser.rb:46:in
`initialize'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/watir-4.0.2/lib/watir/loader.rb:16:in
`new'
    from /Users/qa/.rvm/gems/ruby-1.9.2-p320/gems/watir-4.0.2/lib/watir/loader.rb:16:in
`new'
    from exkad.rb:47:in `<main>'

Thanks 

Reported by laurenthavas on 2013-06-12 19:02:39

lukeis commented 8 years ago
Is this issue still actual?

Reported by barancev on 2013-10-23 20:59:49

lukeis commented 8 years ago
Yes, unfortunately, it is still actual.

Reported by laurenthavas on 2013-12-11 00:42:45

lukeis commented 8 years ago

Reported by jari.bakken on 2015-02-20 17:40:10

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 17:45:12