Issue 6574 in selenium: Can't launch chrome and firefox in ubuntu 13.10

64 views
Skip to first unread message

sele...@googlecode.com

unread,
Nov 14, 2013, 10:09:37 PM11/14/13
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 6574 by AndyC...@gmail.com: Can't launch chrome and firefox in
ubuntu 13.10
http://code.google.com/p/selenium/issues/detail?id=6574

What steps will reproduce the problem?
1. I update chrome to v31, and update chromedriver to v2.6, then I found my
code does not work.

This is my code:

require 'selenium-webdriver'

driver = Selenium::WebDriver.for :chrome
driver.get "http://www.baidu.com"

element = driver.find_element :id => "kw"
element.send_keys "abcdef123456!"
element.submit

puts "Page title is #{driver.title}"

driver.quit

When I run it, I get this error message.

/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/chrome/service.rb:50:in
`start':
unable to connect to chromedriver http://202.102.110.205:9515
(Selenium::WebDriver::Error::WebDriverError)
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/chrome/bridge.rb:15:in
`initialize'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/common/driver.rb:37:in
`new'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/common/driver.rb:37:in
`for'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver.rb:67:in
`for'
from selenium.rb:10:in `<main>'


Then I query the process, and found the chrome process

andy@vmu32andy02:~$ ps -ef | grep chrome
andy 3384 1814 0 10:52 pts/2 00:00:00 /usr/bin/chromedriver
--port=9515
andy 3423 2530 0 10:57 pts/2 00:00:00 grep --color=auto chrome


I have no idea why it use the ip address(202.102.110.205),it's not my ip
address, I think it should use the 127.0.0.1.

When I try the firefox browser, I also get a error message.

/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/firefox/socket_lock.rb:45:in
`initialize':
Cannot assign requested address - bind(2)
(Errno::EADDRNOTAVAIL)
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/firefox/socket_lock.rb:45:in
`new'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/firefox/socket_lock.rb:45:in
`can_lock?'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/firefox/socket_lock.rb:31:in
`lock'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/firefox/socket_lock.rb:17:in
`locked'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/firefox/launcher.rb:32:in
`launch'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/firefox/bridge.rb:24:in
`initialize'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/common/driver.rb:31:in
`new'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/common/driver.rb:31:in
`for'
from
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver.rb:67:in
`for'
from selenium-firefox.rb:5:in `<main>'

Selenium version: 2.37.0
OS: Ubuntu 13.10 32bit
Browser: chrome & firefox
Browser version: chrome_31 & firefox_25




--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
Nov 20, 2013, 4:26:39 AM11/20/13
to selenium-develope...@googlegroups.com
Updates:
Cc: jari.bakken
Labels: Lang-Ruby OpSys-Linux

Comment #1 on issue 6574 by barancev: Can't launch chrome and firefox in
ubuntu 13.10
http://code.google.com/p/selenium/issues/detail?id=6574

(No comment was entered for this change.)

sele...@googlecode.com

unread,
Dec 9, 2013, 5:58:59 PM12/9/13
to selenium-develope...@googlegroups.com

Comment #2 on issue 6574 by coreyoco...@gmail.com: Can't launch chrome and
Confirmed similar behavior for chromedriver on mac with chromedriver 2.27.
I suspect this is related to

https://code.google.com/p/chromedriver/issues/detail?id=398

sele...@googlecode.com

unread,
Dec 9, 2013, 6:17:05 PM12/9/13
to selenium-develope...@googlegroups.com

Comment #3 on issue 6574 by coreyoco...@gmail.com: Can't launch chrome and
I've confirmed this under Jruby 1.7.4 on Mac 10.6, 10.7, and 10.8.
We have patched webdriver/chrome/service.rb to contain

@process.io.stdout = Tempfile.new("chromdriver-output")

before @process.start

This resolved the issue for us

sele...@googlecode.com

unread,
Dec 9, 2013, 6:22:18 PM12/9/13
to selenium-develope...@googlegroups.com

Comment #4 on issue 6574 by coreyoco...@gmail.com: Can't launch chrome and
This can also be resolved by monkey-patching. Which is nice if you cannot
control the version of selenium-webdriver in use:

# override the chromedriver subprocess management to include a stdout drain
# see: https://code.google.com/p/selenium/issues/detail?id=6574
# and: https://code.google.com/p/chromedriver/issues/detail?id=398
module Selenium
module WebDriver
module Chrome
class Service
alias_method :old_start, :start
def start
@process.io.stdout = Tempfile.new("chromdriver-output")
old_start
end
end
end
end
end

sele...@googlecode.com

unread,
Dec 9, 2013, 6:27:21 PM12/9/13
to selenium-develope...@googlegroups.com

Comment #5 on issue 6574 by jari.bakken: Can't launch chrome and firefox in
ubuntu 13.10
http://code.google.com/p/selenium/issues/detail?id=6574

@AndyCnZh: It looks very much like your machine's network is not configured
correctly, i.e. "localhost" is resolving to an IP that can not be bound to.
Please provide the output of the following two commands:

$ ruby -rsocket -e 'p Socket.getaddrinfo "localhost", 80,
Socket::AF_INET, Socket::SOCK_STREAM'
$ ifconfig

@coreyoconnor your problem/fix looks like a totally unrelated issue.

sele...@googlecode.com

unread,
Dec 17, 2013, 3:20:46 AM12/17/13
to selenium-develope...@googlegroups.com

Comment #6 on issue 6574 by prabu.de...@gmail.com: Can't launch chrome and
I cant able to launch selenium codes in chrome browser.

Its working fine in firefox, but showing error as "unable to connect to
chromedriver http://127.0.0.1:9515" when tried with chrome.

OS --- Linux Ubuntu version 14
Codes --- ruby selenium codes
Framework --- Rspec

Scripts
require 'rubygems'
require 'selenium-webdriver'
require 'selenium/client'
require 'yaml'
require 'mysql2'


class Alert_Message

describe "Validation for alert messages" do
it "should display error message" do
@Test1 = Selenium::WebDriver.for :firefox
@wait = Selenium::WebDriver::Wait.new(:timeout => 4)
@Test1.get "http://*****"
@wait.until{@Test1.find_element(:id, "contact_email")}.send_keys "email"

@wait.until{@Test1.find_element(:id, "contact_password")}.send_keys "pwd"

@wait.until{@Test1.find_element(:xpath, "//a[@href='/contacts/sign_out']")}.click
@wait.until{@Test1}.close
end
end
end

The code was in firefox.But when i tried with chrome its showing error.I
made instead of :firefox used :chrome.

sele...@googlecode.com

unread,
Dec 17, 2013, 5:42:59 AM12/17/13
to selenium-develope...@googlegroups.com
Updates:
Status: NeedsClarification
Labels: -Status-Untriaged

Comment #7 on issue 6574 by jari.bakken: Can't launch chrome and firefox in
ubuntu 13.10
http://code.google.com/p/selenium/issues/detail?id=6574

(No comment was entered for this change.)

sele...@googlecode.com

unread,
Jan 28, 2014, 10:46:07 AM1/28/14
to selenium-develope...@googlegroups.com
Updates:
Status: WontFix

Comment #8 on issue 6574 by jari.bakken: Can't launch chrome and firefox in
ubuntu 13.10
http://code.google.com/p/selenium/issues/detail?id=6574

Closing this for lack of response. Please reopen if you have more
information.

@coreyoconnor: you should file a separate issue report for your problem.
Reply all
Reply to author
Forward
0 new messages