Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MacOS Catalina(v 10.15.3): Error: “chromedriver” cannot be opened because the developer cannot be verified. Unable to launch the chrome browser

People also ask

How do I install the latest Chromedriver on Mac?

The easiest way to install ChromeDriver is to use your package manager such as brew or npm to install the driver. In your terminal window with the Homebrew package manager: Install ChromeDriver with brew install cask chromedriver. Confirm it was installed using chromedriver --version and seeing it returns a version.

Where is Chromedriver EXE for selenium Mac?

Enter /usr/local/bin and select Go (check if the bin folder is present. If it is absent, we have to create one) and copy the chromedriver file that we downloaded inside the directory /usr/local/bin.


I found the work around as below

  1. Open terminal
  2. Navigate to path where your chromedriver file is located
  3. Execute any one of the below commands

Command1: xattr -d com.apple.quarantine <name-of-executable>

Example

/usr/local/Caskroom/chromedriver 
$ xattr -d com.apple.quarantine chromedriver 

(or)

Command2: spctl --add --label 'Approved' <name-of-executable>

Source: https://docwhat.org/upgrading-to-catalina

Note: This will work only with the file(s) where the above command is executed. If a new chromedriver is downloaded then the command has to be executed again on the newly downloaded file


In macOS Catalina and macOS Mojave, when an app fails to install because it hasn’t been notarized or is from an unidentified developer, it will appear in System Preferences > Security & Privacy, under the General tab. Click Open Anyway to confirm your intent to open or install the app.

enter image description here

The warning prompt reappears, and you can click Open.*

enter image description here

The app is now saved as an exception to your security settings, and you can open it in the future by double-clicking it, just as you can any authorized app.

*If you're prompted to open Finder: control-click the app in Finder, choose Open from the menu, and then click Open in the dialog that appears. Enter your admin name and password to open the app.


Existing answers are great, and they work.

But an easier solution is to open the terminal and run this:

xattr -d com.apple.quarantine $(which chromedriver)

Quick solution

  1. Open Finder
  2. Navigate to where the chromedriver file is located
  3. Right-click on the chromedriver file and select open

After this the script should work fine.


Two steps to solve this:

  1. Navigate to the path using command- cd /usr/local/bin . This is where you will see your chromedriver installed.
  2. When inside the bin directory, run this command- xattr -d com.apple.quarantine chromedriver .

And that's all. It worked for me like that.


Open terminal and navigate to path where chromedriver is downloaded. Execute xattr -d com.apple.quarantine chromedriver