Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Since updating to Safari 6.2 or 7.1 unable to establish a connection with the SafariDriver extension #7933

Closed
lukeis opened this issue Mar 4, 2016 · 72 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 7933

What steps will reproduce the problem?
1. Update to Safari 6.2 on Mac OSX 10.6
2. Update to selenium-server-standalone-2.43.1.jar
3. Run your tests

What is the expected output? What do you see instead?
- I expected my tests to run fine.
- However, when running my tests Safari loads and gives me the following messages:
[  0.005s] [safaridriver.client] Connecting to SafariDriver browser extension...
[  0.027s] [safaridriver.client] Extension logs may be viewed by clicking the Selenium
[✓] button on the Safari toolbar
[  2.560s] [safaridriver.client] Unable to establish a connection with the SafariDriver
extension

This has only been occurring since I updated Safari. This update was released yesterday.


Selenium version: 2.43.1
OS: Mac OSX 10.8.5
Browser: Safari
Browser version: 6.2


I am writing my tests using Jasmine and Protractor but I'm not sure if this is relevant
to the issue.

Reported by james.warner@coderus.com on 2014-09-19 09:00:08

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Sorry, I can't find a way to edit my original post.

The Operating System I am using is Mac OSX 10.8.5. Where I have mentioned 10.6 is a
mistake, it should be 10.8.5.

Thanks.

Reported by james.warner@coderus.com on 2014-09-19 09:34:22

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

The error received is:

Running "protractor:local" (protractor) task
Running using config.multiCapabilities - config.capabilities will be ignored
[launcher] Running 1 instances of WebDriver

------------------------------------
PID: 3883 (capability: safari #1)
Starting selenium standalone server...
Selenium standalone server started at http://10.100.15.59:61186/wd/hub

/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:109
  var template = new Error(this.message);
                 ^
UnknownError: Failed to connect to SafariDriver after 10056 ms
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'James-Ws-iMac.local', ip: '10.100.15.59', os.name: 'Mac OS X',
os.arch: 'x86_64', os.version: '10.8.5', java.version: '1.6.0_65'
Driver info: driver.version: SafariDriver
    at new bot.Error (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:109:18)
    at Object.bot.response.checkResponse (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:106:9)
    at /Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:134:24
    at /Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1243:15
    at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1531:20)
    at notify (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:354:12)
    at notifyAll (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:323:7)
    at resolve (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:301:7)
    at fulfill (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:421:5)
    at /Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1243:15
==== async task ====
WebDriver.createSession()
    at Function.webdriver.WebDriver.acquireSession_ (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:49)
    at Function.webdriver.WebDriver.createSession (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:111:30)
    at Builder.build (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/builder.js:106:20)
    at LocalDriverProvider.getDriver (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/lib/driverProviders/local.js:121:9)
    at /Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/lib/runner.js:207:35
    at _fulfilled (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:759:13)
    at /Users/jwarner/Documents/bw_service/bw_serviceserver/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:573:44
[launcher] Runner Process Exited With Error Code: 1
[launcher] 1 instance(s) of WebDriver still running
[launcher] Process exited with error code 1
>> 
Fatal error: protractor exited with code: 1

Reported by james.warner@coderus.com on 2014-09-19 09:39:17

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am experiencing the same since upgrading to Safari 6.2 from 6.1.6.  This is also happening
on Safari 7.1, but 7.0.6 worked fine.

Reported by dprantl on 2014-09-20 18:14:01

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2014-09-21 16:22:48

  • Labels added: Browser-Safari, Component-WebDriver

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

HI, 

You need to enable the extension, just go to Safari preferences and extensions, after
make click on the checkbox, check the image below: 


Reported by joaquin.pmp99 on 2014-09-21 23:59:08


- _Attachment: Captura de pantalla 2014-09-21 a la(s) 18.58.04.png
![Captura de pantalla 2014-09-21 a la(s) 18.58.04.png](https://storage.googleapis.com/google-code-attachments/selenium/issue-7933/comment-6/Captura de pantalla 2014-09-21 a la%28s%29 18.58.04.png)_

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

This isn't possible I'm afraid as I don't have the WebDriver extension installed. 
It also cannot be installed from: 'https://extensions.apple.com'

In the past I haven't needed to manually install the WebDriver extension so I don't
understand why I have to now.

All I've done is updated Safari to its newest version and my selenium tests no longer
work. I'm just wondering if other developers are suffering from the same problem and
whether a fix is planned for this.

Reported by james.warner@coderus.com on 2014-09-22 08:08:41

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I'm also experiencing the same issue with Safari 7.1 & 10.9.5. 

Reported by jeff@bynd.com on 2014-09-23 18:52:13

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Issue 7963 has been merged into this issue.

Reported by barancev on 2014-09-26 14:32:15

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Issue 7974 has been merged into this issue.

Reported by barancev on 2014-09-30 06:05:12

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2014-09-30 06:05:38

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am also experiencing the same exact problem. 
Version 7.1 (9537.85.10.17.1) 
OSX 10.9.5
Webdriver 2.43.1

Reported by nir.p@walkme.com on 2014-09-30 09:46:57

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Same issue, 

Version 7.1 (9537.85.10.17.1) 
OSX 10.9.5
Webdriver 2.43.

Reported by lacy.morrow@invitae.com on 2014-10-01 01:10:16

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Same issue, 

Version 7.1 (9537.85.10.17.1) 
OSX 10.9.5
Webdriver 2.43.1

Reported by chevalric on 2014-10-01 08:41:33

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Same issue:

Version 7.1 (9537.85.10.17.1) 
OSX 10.9.5
Webdriver 2.43.1

Reported by eric.paul.vergnaud on 2014-10-01 14:54:29

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Same issue:

Version 7.1 (9537.85.10.17.1)
OSX 10.9.5
Webdriver 2.43.1

Reported by erickmoraes88 on 2014-10-01 16:51:47

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Running into the same issue on Safari 6.2 (OSX 10.8.5) WebDriver 2.43.1.

I have worked around the problem by building the SafariDriver extension locally and
installing this extension rather than relying on WebDriver to install the extension.
Full instructions on building can be found on the wiki - https://code.google.com/p/selenium/wiki/SafariDriverInternals
Obviously its a little more effort to get the tests running this way but at least it
is possible to keep the tests running on these platforms.


Reported by stevejeffers on 2014-10-02 09:37:31

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Built and installed the extension works on OSX 10.9.5 and Safari 7.1.

Reported by jchuong@instartlogic.com on 2014-10-02 18:50:55

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Probably this is the reason of this issue:
http://support.apple.com/kb/HT6409

Reported by leo.fedorov on 2014-10-02 21:03:04

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Is there any way for somebody who has already built the extension to share it?

Reported by leo.fedorov on 2014-10-06 16:29:38

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

To manually install the latest Safari extension (2.43.1): 
- Download Safari Driver jar from here:
http://central.maven.org/maven2/org/seleniumhq/selenium/selenium-safari-driver/2.43.1/selenium-safari-driver-2.43.1.jar
- Unzip it. 
- In Finder, go to ../selenium-safari-driver-2.43.1/org/openqa/selenium
- Double click "SafariDriver.safariextz"

Reported by clayton.lovatto on 2014-10-07 12:41:07

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Thanks !!! works like magic!

Reported by nir.p@walkme.com on 2014-10-07 16:18:44

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Using the extension within the Safari Driver works so thank you!

However this does seem like a temporary solution. But thanks for the help.

Reported by james.warner@coderus.com on 2014-10-07 16:20:33

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi Dima. Thanks for your response.

The first command returned 64 so I ran the second and repeated the first to check that
it returned 0. 

I re-ran the script but got the essentially the same:

Nov 19 20:27:13 macmini sshd[873]: Accepted keyboard-interactive/pam for rjh from port
49492 ssh2
Nov 19 20:27:52 macmini com.apple.SecurityServer[15]: Session 873 created
Nov 19 20:27:53 macmini com.apple.launchd.peruser.501[206] (0x7f9848d31d90.anonymous.Safari[880]):
Unmanaged jobs may not make XPC Events requests.
Nov 19 20:27:53 macmini Safari[880]: Could not set XPC event for stream/key: com.apple.xpc.activity/com.apple.Safari.SafeBrowsingUpdate:
0x1: Operation not permitted
Nov 19 20:28:02 macmini com.apple.launchd[1] (com.apple.WebKit.Networking.E50475A9-A530-499C-AE62-396BBC89006B[881]):
Exited with code: 1

Reported by JoolsChadwick on 2014-11-19 20:46:49

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Any hope for 10.10, I'm getting the error 
Doesnt work for me, My issue is that the tests start but will stop and hang on the

Safari driver launcher page: 

"[  0.091s] [safaridriver.client] Requesting extension connect to client at ws://localhost:6569/wd"

Its hanging at random times in the test run, very fustrating. Any ideas?

Selenium 2.44.0
Java 1.8
MAC
Safari version 8.0

Reported by moya.tech on 2014-11-20 10:52:10

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Jools: I'm starting to suspect that XPC might not be an issue, looking at my own console
log while running tests showed up with that error: http://i.imgur.com/u5z7e4P.jpg

Can you check if extension updates are enabled on that box (http://i.imgur.com/mXtHlf0.png)
I'm curious to see if tagging that switch on and off will do anything to fix it. that's
my last thread of hope without getting any new information


Reported by Dima.Kovalenko on 2014-11-20 16:17:34

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi guys. Im currently on Yosomite and Safari 8.
I too was having the errors

 Caused by: org.openqa.selenium.remote.UnreachableBrowserException: Failed to connect
to SafariDriver after 10161 ms
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'TODIGWS000993.local', ip: 'xx.xx.xx.xx', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.10.1', java.version: '1.8.0_25'
Driver info: driver.version: SafariDriver
    at org.openqa.selenium.safari.SafariDriverCommandExecutor.start(SafariDriverCommandExecutor.java:124)
    at org.openqa.selenium.safari.SafariDriver.startClient(SafariDriver.java:72)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:139)
    at org.openqa.selenium.safari.SafariDriver.<init>(SafariDriver.java:58)
    at org.openqa.selenium.safari.SafariDriver.<init>(SafariDriver.java:51)
    ... 14 more
18:42:43.408 WARN - Exception: Failed to connect to SafariDriver after 10161 ms
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'TODIGWS000993.local', ip: 'xx.xx.xx.xx', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.10.1', java.version: '1.8.0_25'
Driver info: driver.version: SafariDriver


I am setting up my own grid and am using the standalone jar files (2.44.0). I am running
the hub and node via a daemon using the launchd and a .plist file for each.
All other borwsers (FF and Chrome) load the browsers and run the tests fine.

I followed the instruction listed by #33 spyderwe...@gmail.com

Initially when running selenium jars via daemons this did not work. But when i stopped
the daemons and ran the jars (with the same arguments) using the logged in user the
safari driver error went away and the safari browser loaded and ran the test.

I have tried with the -Dwebdriver.safari.noinstall=true but no progress. 

Have also set the daemon to have the same env variables as the logged in user that
did successfully run the test but this also did not work.

Basically the same command works when ran via the logged in user but not via a daemon.
Any help will be greatly appreciated.

Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'TODIGWS000993.local', ip: 'xxxxxxxx', os.name: 'Mac OS X', os.arch:
'x86_64', os.version: '10.10.1', java.version: '1.8.0_25'
safari 8

Here are the logs from the safari driver:

18:40:41.78 [safaridriver.extension] Creating global session...
18:40:41.78 [safaridriver.extension.TabManager] Registering new tab
18:40:41.78 [safaridriver.extension.TabManager] Set command tab to hncoksu5irc9
18:40:41.78 [safaridriver.extension] Creating debug driver...
18:40:41.78 [safaridriver.extension] Waiting for connect command...
18:43:04.20 [safaridriver.extension.TabManager] Registering new tab
18:43:04.20 [safaridriver.extension.TabManager] Tab opened: wgoy5x4bmbnw
18:43:04.34 [safaridriver.extension.TabManager] Ignoring open window event
18:43:04.34 [safaridriver.extension.TabManager] Deleting entry for tab wgoy5x4bmbnw
18:43:04.89 [safaridriver.extension.Server] [wi8mei4r9u3q] Executing command: newSession


Thanks


Reported by ohmydays01 on 2014-12-12 19:03:36

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I have very similar problem like in previous comment #54. 

I'm using Selenium GRID with following configuration:
- MAC OS v 10, Safari 8  - selenium node
- Windows 7, - selenium hub

To launch the node, I use SSH client and after that, it is not possible to run tests
on Safari:
- appears "unable to establish a connection with the safaridriver extension"
- and: "your safari extensions have been migrated"

But when I launch the node directly on MAC, no problem occurs.

Reported by tttttest12345678 on 2014-12-16 09:33:04

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

@ barancev

Any advice or further questions about the issue #54 ?

Reported by ohmydays01 on 2014-12-16 11:46:40

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Thank you Clayton  

Reported by f1076421128 on 2014-12-24 02:13:39

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I'm using Selenium GRID with following configuration:
- MAC OS v 10, Safari 8  - selenium node
- Windows 7, - selenium hub(GridExtras)

The test starts, opens the url and then it just stops and finally the node releases
the session.

Reported by tuhinmitra89 on 2015-01-08 16:11:03

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I'm still have this issue. Does anyone have a fix?

Reported by ihossain@smartasset.com on 2015-01-09 20:16:58

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by jmleyba on 2015-01-09 20:19:20

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Same as posts #38 and #52, my java selenium 2.42 run with Safari 8.0 are hanging/freezing
and the run just stops permanently. The code is never set to just stop like this (wait
functions are clearly defined). This is a big issue for me as the tests are set to
run overnight - is there a separate issue # for this?

Reported by Cyrus.Afshari on 2015-01-20 22:55:37

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

we are running our tests on Safari 7.0 or Safari 8.0 on mac without any
issues

here is what the env looks like.

SAF 7.0. we use selenium-server-standalone-2.37.0 java 1.7.0_45 on OSX:
10.9.4 VM
SAF 8.0 : we use selenium-server-standalone-2.43.1 Java: 1.7.0_51 on OSX:
10.10, you will need to install the webdriver safari extension manually.

1)  download selenium-safari-driver-2.43.1.jar
2) unarchive it to folder.
3) open SafariDriver.safariextz

this should install the extension.

Reported by mbdiwakar on 2015-01-20 23:23:53

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016



I am also facing this issue same as Madhu mentioned in comment#44.

Please help me in solving this issue if anyone solved it already.

Thanks.

Reported by rafi.webdriver on 2015-01-29 06:58:19

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I was facing the similar issue: createDriver
org.openqa.selenium.remote.UnreachableBrowserException: Failed to connect to SafariDriver
after 10342 ms

To get it resolved after trying some things, I registered myself at the Apple Site
for “Safari Developer Program” and generated a certificate to use in Safari. Installed
the certificate in my Key-chain and added the Safari Extension to the browser.

Can refer the site for steps to proceed: https://rationaleemotions.wordpress.com/2012/05/25/working-with-safari-driver/

I am using software configurations like:
Selenium: selenium-server-standalone-2.43.1.jar
Safari: 7.1.3
Mac: 10.9.5

Even tested on latest Selenium 2.44.0 and Safari 8.0. This approach works.

Let me know if some other information is required.

Reported by udaykthakur on 2015-02-04 14:40:49

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am facing the situation in comment #52, but ONLY if connected by SSH. Running the
tests locally works fine. Trying to get it working with Safari 8.0 and MacOS 10.10.
Any help is appreciated. 

Trying following instructions for #65, it seems to apply for Windows, at least the
screenshots are for Safari on Windows. 

Reported by lilushki on 2015-02-04 23:15:30

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Instructions for comment 65 may be geared towards Windows, screenshots at least, but
the process is the same on Mac. The only deviation is the process of generating the
developer certificate (request). The rest for building/installing extension is the
same regardless of platform.

Reported by mangaroo on 2015-02-05 06:55:45

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am having the same problem as comment 54,
When I launch my script as the user it launches fine (After pre installed selenium
extension and setting no-install)

But when I do this via a daemon (cron) or use the command 'sudo -u user <script>' it
fails because the selenium extension is installed but not enabled.
Also tried creating a bash script to run the python script and scheduling the bash
script with cron. Faced same issue in all these approaches

An observation is that only the selenium driver extension is installed and in disabled
state, all other extensions are not present (looks like this info caould not be read
from keychain and since webdriver extension was disabled - it failed to connect)

Guys can someone please look at the daemon launched problem? (the same is simulated
using sudo -u user <script>, here the "cannot find a keychain pop ups come up")

Just in regard to comment 65, 66 and 67.
I have tried this on mac (adding the extension with my generated certificate). This
did not work for me.

Uday, Manga can you confirm that this works in a daemon launch scenario, otherwise
please delete your comment to cause less confusion.

Reported by mithran77 on 2015-02-17 09:36:09

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

My Safari launch problem over ssh is resolved, and Jenkins can run the tests on the
slave. As mentioned in comment #40 Safari extensions are now part of the keychain,
and over SSH the user does not have access to the login keychain. The solution is to
grant that access for EACH ssh session. 

In the SSH session type
security -v unlock-keychain -p <password> ~/Library/Keychains/login.keychain
Then opening Safari with the step below should work
/Applications/Safari.app/Contents/MacOS/Safari

For a 'permanent' solution add a build step, to execute shell script as follows:
#!/bin/bash

   keychain="~/Library/Keychains/login.keychain"
   security unlock-keychain -p <password> ${keychain} &>/dev/null

   if [ $? -ne 0 ];then
     echo "Cannot open keychain ${keychain}"
     exit 1
   fi

As explained here http://sap-production.github.io/xcode-maven-plugin/site/howto/HandlingKeychainsInMasterSlaveEnvironment.html.

Reported by lilushki on 2015-02-17 23:25:32

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

For comment #69, the comment references to building your own SafariDriver extension
with your own developer certificate only covers the normal use case of user running/installing
extension not daemons, cron, SSH, Jenkins. Due note that the original issue filed here
has nothing to do with daemons, therefore, the comments are still relevant. People
are just adding more use cases into this issue, they may be related but aren't necessarily
the same issue here. Like for example as demonstrated by comment #71.

Perhaps the daemon/cron issue is similar to SSH in #71, and would need to be solved
in a similar way.

Reported by mangaroo on 2015-02-17 23:45:16

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by jmleyba on 2015-02-20 17:10:21

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am still unable to get it going, 
Working with Selenium 2.45, on Yosemite with Safari 8.0.4
I have tried following:

i)- I tried installing manually, it gets installed, howeven when selenium invokes it,
i get pop-up that "Extensions have been migrated". I manually enabled the Safari Webdriver
plugin, still when selenium invokes again, i get same error.

ii) I tried with having property
System.setProperty("webdriver.safari.noinstall", "true");
Here I see, where is no plugin in the Safari instance that is invoked by selenium,
altough I have manually installed

iii) I also tried:
security -v unlock-keychain -p <password> ~/Library/Keychains/login.keychain



Reported by prtk152 on 2015-03-30 00:31:15

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Exact same situation as mentioned in 74. on Yosemite with webdriver 2.45. Safari 8.0
Tried everything download and install extension manually. Normal launch of Safari shows
webdriver 2.45 but when safari is launched by Safaridriver, there is no webdriver extension.

Setting webdriver.safari.noinstall=true removes the popup which come otherwise with
every invocation saying "Your extensions have been migrated"

tried to run 2 weird commands also to make output of one command 0, but that also didn't
help.
find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600
\) 2>&- | wc -l
sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown
-h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x
{} + 2>&-

Reported by satish88 on 2015-04-30 06:28:55

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Thanks #71. I was able to resolve my issue by adding this command "security -v unlock-keychain
-p <password> ~/Library/Keychains/login.keychain" in my ssh session.


Reported by LyTonyT on 2015-06-01 22:03:24

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I was facing the same problem on Yosemite with webdriver 2.45. Safari 8.0.I did following
things and its working fine.
Note: I am running my scripts using sudo


1)launch safari from terminal  sudo /Applications/Safari.app/Contents/MacOS/Safari
2)Go to prefrences>>Extensions and drag and drop the the selenium extension here
3)Now run the scripts using sudo .It is working fine for me

.

Reported by singh.is.true on 2015-08-15 12:46:33

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi , I am using MAC 10.10.3 and Safari 8 . I have installed  extension manually and
set the     System.setProperty("webdriver.safari.noinstall", "true");  

I am getting following error 

17/08/15 6:06:02.198 pm storeaccountd[294]: AccountServiceDelegate: Accepting new connection
<NSXPCConnection: 0x7f9621c10f90> connection from pid 1250 with interface <AccountServiceInterface:
0x7f9621e52360> (PID 1250)
17/08/15 6:06:02.221 pm Safari[1250]: Failed to acquire exclusive access to history
store at file:///Users/admin/Library/Safari/History.db. Falling back to an in-memory
history store.
17/08/15 6:06:02.232 pm com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent)
The _DirtyJetsamMemoryLimit key is not available on this platform.
17/08/15 6:06:03.242 pm locationd[296]: Couldn't find a requirement string for masquerading
client /System/Library/PrivateFrameworks/Parsec.framework
17/08/15 6:06:03.242 pm locationd[296]: could not get apple languages array, assuming
english
17/08/15 6:06:03.281 pm com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent)
The _DirtyJetsamMemoryLimit key is not available on this platform.
17/08/15 6:06:11.810 pm CoreServicesUIAgent[1251]: unexpected message <OS_xpc_error:
<error: 0x7fff7278ec60> { count = 1, contents =
    "XPCErrorDescription" => <string: 0x7fff7278ef70> { length = 18, contents = "Connection
invalid" }
}>
17/08/15 6:06:11.812 pm com.apple.xpc.launchd[1]: (com.apple.WebKit.Networking.8A832941-70FC-4B3F-AC83-D264E5B4D584[1252])
Service exited with abnormal code: 1
17/08/15 6:06:11.823 pm com.apple.xpc.launchd[1]: (com.apple.WebKit.WebContent.E314DFBB-F3B0-43AF-9F69-7C3817ABFA6A[1253])
Service exited with abnormal code: 1



Please someone help me in this

Reported by sudhu.hegde on 2015-08-17 12:36:35

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:24:36

  • Labels added: Restrict-AddIssueComment-Commit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant