geckodriver icon indicating copy to clipboard operation
geckodriver copied to clipboard

Notarization feature blocks geckodriver from running (since MacOS Catalina)

Open Ya3Sh opened this issue 6 years ago • 10 comments

I get this prompt on Mac while running test on FireFox.

  • Version: 0.25.0
  • Platform: macOS/Windows + Catalina 10.15
  • Firefox: 69.0.3
  • Selenium: 3.13.0

Stacktrace

“geckodriver” can’t be opened because Apple cannot check it for malicious software.

Ya3Sh avatar Oct 10 '19 19:10 Ya3Sh

@andreastt you have Catalina on your MacBook. Can you please have a look if the now signed binaries are causing this?

whimboo avatar Oct 11 '19 07:10 whimboo

I can confirm that the signed builds of geckodriver do not run on macOS Catalina. This because they are not notarised for some reason. We are tracking this in https://bugzilla.mozilla.org/show_bug.cgi?id=1588081.

andreastt avatar Oct 11 '19 22:10 andreastt

Does launching the binary also not work if the geckodriver archive has been downloaded via curl or wget?

whimboo avatar Oct 15 '19 09:10 whimboo

We can use geckodriver (or any other driver) on macOS if you explicitly open it in the OS prior to using it in your scripts. In Finder, go to the location of the binary and open it via the right-click menu. Click "Open" in the dialog that pops up. Close the terminal after doing so.

Maybe we can update the release notes with this info as well.

letam avatar Oct 15 '19 20:10 letam

This would not help in a CI environment where you would have to do that on various systems. Maybe the xattr command would help.

whimboo avatar Oct 16 '19 08:10 whimboo

Installing geckodriver with brew solves this problem: brew install geckodriver

captain-fox avatar May 12 '20 12:05 captain-fox

One simple workaround works right from the Finder:

  1. control-click on the geckodriver binary but keep the mouse button/touch pad pressed...
  2. remove finger from control key and press on option key...
  3. you will see the menu change...
  4. then select the "open" menu item with the mouse/touchpad and it will open in the terminal.
  5. close the terminal and you are done. You have given macOS permission to run that binary. Note: this works for all binaries Catalina rejects so this works for chromedriver for Chrome as well

Danilushka avatar Jun 26 '20 22:06 Danilushka

One simple workaround works right from the Finder:

  1. control-click on the geckodriver binary but keep the mouse button/touch pad pressed...
  2. remove finger from control key and press on option key...
  3. you will see the menu change...
  4. then select the "open" menu item with the mouse/touchpad and it will open in the terminal.
  5. close the terminal and you are done. You have given macOS permission to run that binary. Note: this works for all binaries Catalina rejects so this works for chromedriver for Chrome as well

works for me, OSX 10.15.4

fifiteen82726 avatar Sep 09 '20 16:09 fifiteen82726

Apparently npm -g install geckodriver works fine, but homebrew would be better IMO

imclint21 avatar Oct 10 '20 00:10 imclint21

One simple workaround works right from the Finder:

1. control-click on the geckodriver binary but keep the mouse button/touch pad pressed...

2. remove finger from control key and press on option key...

3. you will see the menu change...

4. then select the "open" menu item with the mouse/touchpad and it will open in the terminal.

5. close the terminal and you are done. You have given macOS permission to run that binary.
   Note: this works for all binaries Catalina rejects so this works for chromedriver for Chrome as well

it works on big sur also, thx

hilmandei avatar Dec 27 '20 03:12 hilmandei