Google Chrome crash on mac

2,023 views
Skip to first unread message

Gilad Penn

unread,
Jun 27, 2013, 9:45:27 AM6/27/13
to seleniu...@googlegroups.com
Using Google Chrome Version 28.0.1500.52 beta
Using Mac OS X 10.9
Using selenium

Launched google chrome driver, input on command line: node test.js

test.js:
var webdriver = require('selenium-webdriver');

var driver = new webdriver.Builder()
  .usingServer('http://localhost:9515/')
  .withCapabilities({
    'browserName': 'chrome',
    'version': '',
    'platform': 'ANY',
    'javascriptEnabled': true
  })
  .build();

driver.get('http://www.google.com');
driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');
driver.findElement(webdriver.By.name('btnG')).click();
var title = driver.getTitle().then(function(title) {
  console.log(title);
  require('assert').equal('webdriver - Google Search', title);

});

driver.quit();

log from chromedriver:
[414.864][INFO]: received WebDriver request: POST /session {
   "desiredCapabilities": {
      "browserName": "chrome",
      "javascriptEnabled": true,
      "platform": "ANY",
      "version": ""
   }
}
[414.910][INFO]: Launching chrome: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --remote-debugging-port=64378 --no-first-run --enable-logging --logging-level=1 --user-data-dir=/var/folders/63/4znhz1fj0yqbk33sw_7ddnh80000gn/T/.org.chromium.Chromium.5XhnEX --load-extension=/var/folders/63/4znhz1fj0yqbk33sw_7ddnh80000gn/T/.org.chromium.Chromium.IzfzJu/internal --ignore-certificate-errors data:text/html;charset=utf-8,
[434.967][INFO]: sending WebDriver response: 200 {
   "sessionId": "",
   "status": 13,
   "value": {
      "message": "unknown error: Chrome failed to start: was killed\n  (Driver info: chromedriver=2.0,platform=Mac OS X 10.9.0 x86_64)"
   }
}

log from other shell:
timers.js:103
            if (!process.listeners('uncaughtException').length) throw e;
                                                                      ^
UnknownError: unknown error: Chrome failed to start: was killed
  (Driver info: chromedriver=2.0,platform=Mac OS X 10.9.0 x86_64)
    at new bot.Error (/Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/atoms/error.js:92:18)
    at Object.bot.response.checkResponse (/Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/atoms/response.js:106:9)
    at /Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/webdriver/webdriver.js:136:24
    at /Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/goog/base.js:1112:15
    at webdriver.promise.Application.runInNewFrame_ (/Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/webdriver/promise.js:1308:20)
    at notify (/Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/webdriver/promise.js:299:24)
    at notifyAll (/Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/webdriver/promise.js:274:7)
    at resolve (/Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/webdriver/promise.js:369:7)
    at /Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/webdriver/promise.js:539:51
    at /Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/webdriver/http/http.js:97:5
==== async task ====
WebDriver.createSession()
    at Function.webdriver.WebDriver.acquireSession_ (/Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/webdriver/webdriver.js:133:61)
    at Function.webdriver.WebDriver.createSession (/Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/webdriver/webdriver.js:112:30)
    at node.Builder.build (/Users/freeslugs/node_modules/selenium-webdriverjs/webdriver/lib/node/builder.js:45:32)
    at Object.<anonymous> (/Users/freeslugs/test.js:11:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)

any ideas?

Justin Searls

unread,
Sep 5, 2013, 10:43:19 PM9/5/13
to seleniu...@googlegroups.com, free...@gmail.com
+1, it seems like ChromeDriver does not work under Mavericks (10.9). 

Sad panda.

Mike Atlas

unread,
Oct 22, 2013, 5:55:20 PM10/22/13
to seleniu...@googlegroups.com, free...@gmail.com
+1 Seeing crashes of chromedriver on Mavericks 10.9 today on the official launch of Mavericks.

Matthias Hartmann

unread,
Oct 23, 2013, 6:12:00 AM10/23/13
to seleniu...@googlegroups.com, free...@gmail.com
got the same problem: but chrome is starting properly when i start it with "--verbose". without its killed instantly

Oscar Rieken

unread,
Oct 23, 2013, 8:09:12 AM10/23/13
to seleniu...@googlegroups.com, free...@gmail.com
I understand how most apple product owners need to have the latest and greatest the second it comes out. with that comes the risk of the things you need not working. 

I would also suggest updating to the latest of everything,
The only error that was posted is using chromedriver 2.0 current version is 2.4 and current version of selenium-webdriver is 2.37 also the current version of chrome is actually 30 not 28 


I'm going to go a head and say that it may have to do with how apple has chosen to change its internal libs a bit, seeing as how just about everything that i would normally use on mac is broken right now, Like brew, the fact that the command line build tools are different from the previous versions and you cant even install them via xcode anymore without hacking around. 



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a4b29e79-ed61-4e8b-98e5-db9357cf7f12%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Krishnan Mahadevan

unread,
Oct 23, 2013, 8:20:55 AM10/23/13
to Selenium Users
Oscar...

>>>>>>I'm going to go a head and say that it may have to do with how apple has chosen to change its internal libs a bit, seeing as how just about everything that i would normally use on mac is broken right now, Like brew, the fact that the command line build tools are different from the previous versions and you cant even install them via xcode anymore without hacking around.


Yikes !!! That sounds scary..especially for imbeciles like me who are still trying to get a feel of how to use the MAC :( 
**sigh**

But thanks for the heads up though! My hands were literally itching to take the free upgrade the moment I saw it pop up on my MAC today morning. I will just let the itch pass on for some more days :)




Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


Mike Atlas

unread,
Oct 23, 2013, 9:07:26 AM10/23/13
to seleniu...@googlegroups.com, seleniu...@googlegroups.com, free...@gmail.com
The --verbose switch workaround also works for me. 

I've also seen crashes of ST2 and other "big user base" apps on Mavericks. Things will get fixed quickly. 

On Oct 23, 2013, at 6:12 AM, Matthias Hartmann <ma...@spreadshirt.net> wrote:

got the same problem: but chrome is starting properly when i start it with "--verbose". without its killed instantly

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/GHTNYFNEzPk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

Greg Bergé

unread,
Oct 23, 2013, 9:50:43 AM10/23/13
to seleniu...@googlegroups.com, free...@gmail.com
How do you specify verbose in standalone mode ?

java -jar selenium.jar -Dwebdriver.chrome.driver=chromewebdriver

Thanks

Allen Cook

unread,
Oct 23, 2013, 10:51:47 AM10/23/13
to seleniu...@googlegroups.com, free...@gmail.com
I'm not seeing --verbose fix my problem.

            capability = DesiredCapabilities.chrome();
            capability.setCapability("chrome.switches",
                    Arrays.asList("--verbose"));
            webDriver = new RemoteWebDriver(new URL(url), capability);

I'm still getting this error when I run Selenium

org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: was killed

bjh...@gmail.com

unread,
Oct 23, 2013, 10:57:38 AM10/23/13
to seleniu...@googlegroups.com, free...@gmail.com
How are you setting the verbose switch for chromedriver?  I know to add --verbose to chrome via ChromeOptions but I don't believe this affects chromedriver.


On Wednesday, October 23, 2013 9:07:26 AM UTC-4, Mike Atlas wrote:

Mike Atlas

unread,
Oct 23, 2013, 12:16:39 PM10/23/13
to seleniu...@googlegroups.com, free...@gmail.com
I'm running in ruby. I found that the driver was no longer exiting regularly on its own (with exception unknown error: Chrome failed to start: was killed) , so my fix is the following:

require 'sys/proctable'
include Sys
def run_tests
kill_drivers
start_drivers(:chrome)
# ... run tests
end
      
def kill_drivers
@driver.quit unless @driver.nil?
@chromedriver = get_pid('chromedriver') if @chromedriver.nil?
Process.kill("KILL", @chromedriver) if !@chromedriver.nil? && @chromedriver > 0
end

def start_drivers(driver)
@chromedriver = fork { `chromedriver --verbose --log-path=/tmp/chromedriver.log` } if driver == :chrome
@driver = Selenium::WebDriver.for driver
end

def get_pid(proc_name)
ProcTable.ps do |p|
   if p.comm.include?(proc_name)
   puts "pid: #{p.pid.to_s} proc_name: #{p.comm}"
   return p.pid
   end
end
end

Justine

unread,
Oct 23, 2013, 2:25:29 PM10/23/13
to seleniu...@googlegroups.com, free...@gmail.com
Hi Mike Atlas - thanks for posting your code!  It'd be really helpful to me to know where you put your code?  Are you putting them in the spec files directly?  And do I need to have the sys-proctable gem or is there an alternative?

Thank you!

Mike Atlas

unread,
Oct 23, 2013, 4:37:48 PM10/23/13
to seleniu...@googlegroups.com, free...@gmail.com
At least in my case, our automation suite is independent from any particular spec runner, and how you chose to go about ensuring existing instances of chromedriver are not running is up to you.

In summary: 
 - ensure the launch call to start chromedriver has the --verbose switch. I'm also passing the --log-path=/tmp/chromedriver.log as well. I don't believe, according to what others are saying below, that this 2nd switch is necessary.
 - ensure existing instances of chromedriver are killed before launching it again. I happen to achieve this using the sys-proctable gem, but there are probably other ways you could find the process id for it and kill it (call `ps | grep chromedriver` and parse the output, perhaps?).

Liron Yahdav

unread,
Oct 24, 2013, 1:47:50 PM10/24/13
to seleniu...@googlegroups.com, free...@gmail.com
FYI, I'm using chromedriver with the Capybara ruby gem and I was able to add the --verbose flag to fix the issue by adding the following code to spec_helper.rb after I register the Selenium driver with Capybara:
class Selenium::WebDriver::Chrome::Bridge
  def extract_service_args(opts)
    args = ['--verbose']                                               
                                                            
    if opts.has_key?(:service_log_path)                     
      args << "--log-path=#{opts.delete(:service_log_path)}"
    end                                                     
                                                            
    args                                                    
  end
end

Chris Hansen

unread,
Oct 24, 2013, 8:02:05 PM10/24/13
to seleniu...@googlegroups.com, free...@gmail.com
For reference, chromedriver issue 590 [1].

As stated, adding --verbose to chromedriver works, but there is no way (that I can find) of doing this in Java. ChromeOptions and chrome.switches (mentioned previously) is for passing arguments to Chrome, while ChromeDriverService is for passing arguments to chromedriver. However it doesn't provide a way to pass --verbose so I've created a patch [2]. We'll see which of the two issues get fixed first.


-Chris

Sean Romocki

unread,
Oct 25, 2013, 2:52:39 PM10/25/13
to seleniu...@googlegroups.com, free...@gmail.com
I'm trying to do this same thing in javascript when running selenium-server-standalone-2.37.0.jar with the following code, but I'm still getting "Fatal error: The environment you requested was unavailable." error.
Any thoughts?  Maybe I'm not passing the arguments the right way.

      child = spawn('java', [
        '-jar', outfile,
        '-Dwebdriver.chrome.driver='+ options.chrome,
        '-Dwebdriver.chrome.args="--verbose]',
        '-Dwebdriver.chrome.logfile="/dev/null"',
        '-port', port,
      ])
Reply all
Reply to author
Forward
0 new messages