Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

URLResourceKey.quarantinePropertiesKey is only available on OS X 10.10 or newer when installing chromedriver

I am downloading chromedriver through a brew cask install (see related issue ) and when I try to download it I get the following error (pasted full output from command entry):

(env) MacBook:project_dir owner$ brew cask install chromedriver
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
dnstwist            grpc                pdns                uftp
firebase-cli        lf                  pdnsrec             wildfly-as
glslviewer          libxlsxwriter       tile38              zabbix

==> Satisfying dependencies
==> Downloading https://chromedriver.storage.googleapis.com/2.41/chromedriver_ma
######################################################################## 100.0%
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/utils/quarantine.swift:29:30: error: 'quarantinePropertiesKey' is only available on OS X 10.10 or newer
      forKey: URLResourceKey.quarantinePropertiesKey
                             ^
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/utils/quarantine.swift:29:30: note: add 'if #available' version check
      forKey: URLResourceKey.quarantinePropertiesKey
                             ^
Error: Failed to quarantine /Users/user/Library/Caches/Homebrew/downloads/42621d77ecaa889fa8ca73ac4b2a2228e3c1d11f20d84c6898e7645397d00f1d--chromedriver_mac64.zip. Here's the reason:
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/utils/quarantine.swift:29:30: error: 'quarantinePropertiesKey' is only available on OS X 10.10 or newer
      forKey: URLResourceKey.quarantinePropertiesKey
                             ^
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/utils/quarantine.swift:29:30: note: add 'if #available' version check
      forKey: URLResourceKey.quarantinePropertiesKey

My current macbook specs are as follows:enter image description here

Has anyone ran into this issue before? Any help would be appreciated. I am trying to set up a headless chrome driver and failing.

UPDATE_EDIT: I've since moved on from Chrome and had more luck using Firefox headless instead, but this is still no solution to the issue above.

like image 289
Q.H. Avatar asked Sep 03 '18 03:09

Q.H.


2 Answers

https://github.com/Homebrew/homebrew-cask/issues/51554#issuecomment-418215466

try below.

$ brew cask install --no-quarantine chromedriver
like image 50
iHideck Avatar answered Nov 15 '22 06:11

iHideck


This is due to a current bug in Homebrew, and a fix has been merged

Per issue #4809:

Hi, PR #4656 appears to break brew cask install on 10.11. I get an error on 10.11, but not on 10.12. As a workaround, re-running with the --no-quarantine flag is successful. I'm not sure why this swift feature isn't available, my OS is up to date.

(snip)

/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/utils/quarantine.swift:29:30: error: 'quarantinePropertiesKey' is only available on OS X 10.10 or newer
      forKey: URLResourceKey.quarantinePropertiesKey

(etc)

(snip and etc mine)

This is the same issue you are facing.

There is a PR (#4796) that addresses this, which has been merged into master as of a day ago (2018-09-06):

The Gatekeeper API I've written relies on an up-to-date CLT (or Xcode) install, and xattr's -r flag for native recursion. There are cases where Swift is too old or is set to a deployment target earlier than MacOS 10.10, and thus cannot use the URLResourceKey.quarantinePropertiesKey constant. And in the current Mojave beta, xattr does not have Apple's -r extension for doing native filesystem traversal.

This pull request inserts an additional check in the Swift script, the Quarantine.available? function and brew cask doctor, and changes propagate to use xargs for recursion.

I just ran a brew update and it tells me I am running 1.7.3 running at commit 5d894, which was committed today (2018-09-07) and is the latest version of homebrew-core at time of writing.

like image 34
bertieb Avatar answered Nov 15 '22 07:11

bertieb