Virtual-environments: safaridriver returns error

Created on 13 Nov 2019  路  13Comments  路  Source: actions/virtual-environments

Describe the bug

Maybe due to a bug in the upstream, safaridriver doesn't working from current version, you will need to update if a new release is already available. I found out about this on @mizchi's article, and when I actually tried it, it doesn't work yet. (Maybe you are more familiar with this issue than me, so please forgive me for pinging you.)

Virtual environments affected

  • [x] macOS 10.15
  • [ ] Ubuntu 16.04 LTS
  • [ ] Ubuntu 18.04 LTS
  • [ ] Windows Server 2016 R2
  • [ ] Windows Server 2019

Expected behavior

It should work.

Actual behavior

(Keep empty cause there is nothing to explain.)

Apple Testing and code coverage macOS awaiting-deployment bug

Most helpful comment

It will happen in a week

All 13 comments

Safari driver is simply not enabled in my case (safaridriver --enable). But it is not possible to manually enable driver from the job as enabling requires user password.

Output from Selenium test suite:

Error: An error occurred while retrieving a new session: 
"Could not create a session: You must enable the 'Allow Remote Automation' option in Safari's Develop menu to control Safari via WebDriver."

I'm able to run sudo safaridrver --enable and then start it with safaridriver -p 0 & successfully but I still get the "Allow Remote Automation" error.

Changed title.

We're running into this issue as well, using a configuration that led to working Safari automation inside Travis CI's Mac environment.

Here's an example GitHub Actions workflow config that seems to do the right things in terms of enabling automation in Safari, but still leads to thee same failures mentioned above:

    - run: |
        defaults write com.apple.Safari IncludeDevelopMenu YES
        defaults write com.apple.Safari AllowRemoteAutomation 1
        sudo safaridriver --enable
        safaridriver -p 0 &

Hello, issue is fixed and fix will be deployed with next image rollout

Great news! 馃帀 When can we expect the next image rollout?

It will happen in a week

@maxim-lobanov Has this been fixed?

@imbsky @mucsi96 @adadkins the image has been deployed. Could you check safaridriver, please?

@miketimofeev This is working for me now. Amazing that this was fixed so quickly! It'd be nice if they confirmed it as well.

Is @jeffposnick comment the proper way to enable this(since this is working for me now), or is there a better way?

    - run: |
        defaults write com.apple.Safari IncludeDevelopMenu YES
        defaults write com.apple.Safari AllowRemoteAutomation 1
        sudo safaridriver --enable
        safaridriver -p 0 &

@adadkins In latest environment, you only need to run sudo safaridriver--enable.

This has been fixed in the latest environment and should be closed.

I opened a PR to a Japanese developer's repository, so please check it for details.
https://github.com/mizchi/frontend-gh-action-playground/pull/8

Was this page helpful?
0 / 5 - 0 ratings