Unable to connect to SafariDriver extension when running through Jenkins

538 views
Skip to first unread message

Justin Woolley

unread,
Dec 11, 2014, 7:20:12 PM12/11/14
to seleniu...@googlegroups.com
I have an existing test suite that uses WebDriverJs with node.js and am adding support for Safari on OSX 10.10. The suite currently supports IE11 and Chrome and runs via Jenkins. I can get selenium running locally with SafariDriver using the -noinstall option after manually installing the extension. When I try run the automation on the same machine as a Jenkins slave, though, the extension doesn't load, and the webdriver fails with  "UnknownError: Failed to connect to SafariDriver after N ms". This failure happens whether Jenkins connects to the slave via SSH or Java Web Start; I found that it also happens if I manually ssh into the machine and run launch the node.js same command myself. 

I also found that I can I manually install the extension in the Safari session while the automation is running, which will cause the extension will be installed on subsequent launches. However, when Safari launches, I'll receive a "your extensions have been migrated" message, and the extension will be disabled, which causes webdriver will fail with the same error. Even if I enable the extension within the webdriver session, the setting isn't retained so it fails consistently.

Other possibly pertinent info:
  • I wasn't able to get SafariDriver to run even locally without the -noinstall option
  • The same suite runs without problems on the same jenkins slave when using ChromeDriver
  • I'm seeing the same behavior with Mavericks/Safari 7.1
  • My selenium-server and SafariDriver are both version 2.44
It seems that something about the remote connection is precluding Safari from loading the extension and/or from persisting the extension settings. Has anybody else encountered this issue? Any ideas or suggestions for workarounds? Thanks!


Hernando Torres-Rocca

unread,
Apr 10, 2015, 3:44:00 PM4/10/15
to seleniu...@googlegroups.com
I am also encountering the same issue.  I am running jenkins on my mac book
pro and the build opens the safari browser but the web driver extension is
not present.

I have only experienced it for the last couple of days and finally figured
out it is a problem with the safari webdriver extension.  What is confusing
is that I can run the exact same command from the terminal and it works
fine but from jenkins the extension is missing.

Have you found a solution to this problem?

The log has:

[safari #1] Starting selenium standalone server...
[safari #1] Selenium standalone server started at
http://192.168.0.5:50701/wd/hub
[safari #1] ERROR - Unable to start a WebDriver session.
[safari #1]
[safari #1]
/Users/hernando/.jenkins/jobs/Build-DTP-Website/workspace/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113
[safari #1]   var template = new Error(this.message);
[safari #1]                  ^
[safari #1] UnknownError: Failed to connect to SafariDriver after 10055 ms
[safari #1] Build info: version: '2.45.0', revision: '5017cb8', time:
'2015-02-26 23:59:50'
[safari #1] System info: host: 'HMBP.local', ip: '0.0.0.0', os.name: 'Mac
OS X', os.arch: 'x86_64', os.version: '10.10.3', java.version: '1.8.0_20'
[safari #1] Driver info: driver.version: SafariDriver

Cheers.

Vinay Shah

unread,
Apr 30, 2015, 3:34:35 PM4/30/15
to seleniu...@googlegroups.com
Hi Justin,
    I am running into similar issue.  My environment is Mac OS X (10.10.2), Selenium 2.45 (also tried 2.44) and Safari 8.0.3.  Have you found solution for this?

Thanks,
Vinay
Reply all
Reply to author
Forward
0 new messages