Selenium crashes Chrome when running from Jenkins

1,568 views
Skip to first unread message

Liron Yahdav

unread,
Aug 6, 2012, 1:31:06 PM8/6/12
to jenkins...@googlegroups.com
TLDR: Running ruby scripts from Jenkins on OS X that use the selenium-webdriver gem with chromedriver causes the "Aw snap" page to come up in Chrome. Running those same scripts from outside of Jenkins works fine. Any ideas as to what's wrong?

------

Long version:
We have a CI machine that's a MacBook Pro running OS X Mountain Lion with Jenkins installed. The Jenkins server runs as a user who can login to the system. We configured Jasmine to use Chrome for the `rake jasmine:ci` command by setting ENV['JASMINE_BROWSER'] = 'chrome'. This all works fine when running `rake jasmine:ci` from the command line on that machine, but when Jenkins is configured to run the same exact command, Chrome will start up and when it tries to hit the url to run the tests, the tab crashes with the "Aw Snap" error page. I looked at the chromedriver.log file that's generated and there are no errors, it basically just stops all of a sudden. The Jenkins build eventually gets a Selenium timeout error.

I've tried setting up the same config on a MacBook Air running OS X Lion and the same problem occurs.
We also have integration tests written with RSpec and Capybara and when we configure it to use Selenium with chromedriver, the same problem occurs when running through Jenkins, though the "Aw Snap" page comes up a few steps into the first test.

Has anyone gotten a similar setup working or have any idea what the issue could be? Thanks!

Sami Tikka

unread,
Aug 7, 2012, 5:01:02 PM8/7/12
to jenkins...@googlegroups.com
And how did you install Jenkins?

-- Sami

Liron Yahdav

unread,
Aug 7, 2012, 8:15:23 PM8/7/12
to jenkins...@googlegroups.com
I installed it using the Mac OS X native package link from the http://jenkins-ci.org/ homepage.

Sami Tikka

unread,
Aug 10, 2012, 12:56:49 AM8/10/12
to jenkins...@googlegroups.com
Unless you have changed the configuration by hand, the native OS X package sets up Jenkins as a launch daemon. Launch daemons have no access to window server, thus they are unable to display windows, like chrome. 

You must run Jenkins as a launch agent or use https://github.com/stisti/jenkins-app

-- Sami

Liron Yahdav

unread,
Aug 20, 2012, 2:30:59 PM8/20/12
to jenkins...@googlegroups.com
Thanks Sami, that fixed the issue! We configured Jenkins to run as a launch agent. It was just strange that when running as a launch daemon it would start up Chrome and I would see the window for Chrome, but it would go to the "aw, snap" error page in Chrome. I would think that if there were no access to the window server it wouldn't even display the window. I just don't know much about daemons and window servers on OS X. Anyway, thanks again.

Liron

Sami Tikka

unread,
Aug 20, 2012, 4:13:52 PM8/20/12
to jenkins...@googlegroups.com
I think the story goes there is a bug in OS X that allows some access to windowserver but not to all the services that would make a fully functional application. 

-- Sami

Tamilarasan Rajendran

unread,
Oct 28, 2014, 1:28:11 PM10/28/14
to jenkins...@googlegroups.com
Hi, I am also facing similar issue.

I am trying to execute my automation scripts in Jenkins.

We have 2 slave machine.. one is Win7 (OS) and other is winxp (OS).

When i change the slave machine to winxp, my scripts works perfectly without any issues.

But, when i change ti win7 OS machine, my scripts getting failed saying,

Chrome failed to start: crashed (Driver info: chromedriver=2.9.248315, platform= windows NT 6.1 SP1 x86_32).

--
Tamilarasan.

James Green

unread,
Oct 29, 2014, 5:18:17 AM10/29/14
to jenkins...@googlegroups.com
That's a two year-old thread. There are other issues that are similar (https://code.google.com/p/chromedriver/issues/detail?id=928) and current.
Reply all
Reply to author
Forward
0 new messages