homebrew-cask: “Failed to quarantine” an app during Install/Upgrade/Reinstall
General troubleshooting steps
- I have retried my command with
--forceand the issue is still present. - I have checked the instructions for reporting bugs. Yes, I did read those instructions.
- I made doubly sure this is not a checksum does not match error.
- I ran
brew update-reset && brew updateand retried my command. The error still persists. - I ran
brew doctor, fixed as many issues as possible and retried my command. - I understand that if I ignore these instructions, my issue may be closed without review.
Note
Error detected during execution of brew update-reset && brew update
$ brew update-reset && brew update
==> Fetching /usr/local/Homebrew...
error: unknown option `shallow-since=refs/tags/1.7.2'
usage: git fetch [<options>] [<repository> [<refspec>...]]
or: git fetch [<options>] <group>
or: git fetch --multiple [<options>] [(<repository> | <group>)...]
or: git fetch --all [<options>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--all fetch from all remotes
-a, --append append to .git/FETCH_HEAD instead of overwriting
--upload-pack <path> path to upload pack on remote end
-f, --force force overwrite of local branch
-m, --multiple fetch from multiple remotes
-t, --tags fetch all tags and associated objects
-n do not fetch all tags (--no-tags)
-j, --jobs <n> number of submodules fetched in parallel
-p, --prune prune remote-tracking branches no longer on remote
--recurse-submodules[=<on-demand>]
control recursive fetching of submodules
--dry-run dry run
-k, --keep keep downloaded pack
-u, --update-head-ok allow updating of HEAD ref
--progress force progress reporting
--depth <depth> deepen history of shallow clone
--unshallow convert to a complete repository
--update-shallow accept refs that update .git/shallow
--refmap <refmap> specify fetch refmap
-4, --ipv4 use IPv4 addresses only
-6, --ipv6 use IPv6 addresses only
==> Resetting /usr/local/Homebrew...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-boneyard...
==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-boneyard...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-completions...
==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-completions...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes...
==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions...
==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
==> Fetching /usr/local/Homebrew/Library/Taps/yudai/homebrew-gotty...
==> Resetting /usr/local/Homebrew/Library/Taps/yudai/homebrew-gotty...
Branch master set up to track remote branch master from origin.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
Already up-to-date.
Description of issue
Since running the command brew update this week, I’m suddenly no longer able to install, reinstall or upgrade a “cask” package. I did not have this problem last week.
Command that failed
$ brew cask install fluor
==> Satisfying dependencies
==> Downloading https://resources.pyrolyse.it/distrib/Fluor/Fluor%202.0.2.dmg
Already downloaded: /Users/Nathalie/Library/Caches/Homebrew/downloads/65117e9a1ef9ba64db9833b7a3789fdf03c8c224d45fdfe8d35c6bcd4cafe15d--Fluor 2.0.2.dmg
/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/Nathalie/Library/Caches/Homebrew/downloads/65117e9a1ef9ba64db9833b7a3789fdf03c8c224d45fdfe8d35c6bcd4cafe15d--Fluor 2.0.2.dmg. 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
^
Same output for brew cask upgrade and brew cask reinstall
Output of command with --force --verbose --debug
$ brew cask install --force --verbose --debug fluor
==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://resources.pyrolyse.it/distrib/Fluor/Fluor%202.0.2.dmg
Already downloaded: /Users/Nathalie/Library/Caches/Homebrew/downloads/65117e9a1ef9ba64db9833b7a3789fdf03c8c224d45fdfe8d35c6bcd4cafe15d--Fluor 2.0.2.dmg
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/Nathalie/Library/Caches/Homebrew/downloads/65117e9a1ef9ba64db9833b7a3789fdf03c8c224d45fdfe8d35c6bcd4cafe15d--Fluor 2.0.2.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/Nathalie/Library/Caches/Homebrew/downloads/65117e9a1ef9ba64db9833b7a3789fdf03c8c224d45fdfe8d35c6bcd4cafe15d--Fluor\ 2.0.2.dmg
==> /Users/Nathalie/Library/Caches/Homebrew/downloads/65117e9a1ef9ba64db9833b7a3789fdf03c8c224d45fdfe8d35c6bcd4cafe15d--Fluor 2.0.2.dmg is not quarantined
==> Quarantining /Users/Nathalie/Library/Caches/Homebrew/downloads/65117e9a1ef9ba64db9833b7a3789fdf03c8c224d45fdfe8d35c6bcd4cafe15d--Fluor 2.0.2.dmg
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/utils/quarantine.swift /Users/Nathalie/Library/Caches/Homebrew/downloads/65117e9a1ef9ba64db9833b7a3789fdf03c8c224d45fdfe8d35c6bcd4cafe15d--Fluor\ 2.0.2.dmg https://resources.pyrolyse.it/distrib/Fluor/Fluor\%202.0.2.dmg https://fluorapp.net/
/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/Nathalie/Library/Caches/Homebrew/downloads/65117e9a1ef9ba64db9833b7a3789fdf03c8c224d45fdfe8d35c6bcd4cafe15d--Fluor 2.0.2.dmg. 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
^
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:58:in `cask'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:53:in `quarantine'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:19:in `perform'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:148:in `download'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:64:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:92:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:21:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:14:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:14:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb:34:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:90:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:156:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:121:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:161:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:161:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:144:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:121:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
Output of brew cask doctor
$ brew cask doctor
==> Homebrew-Cask Version
Homebrew-Cask 1.7.2-106-g794fe5d
Homebrew/homebrew-cask (git revision 82051; last commit 2018-09-02)
==> macOS
10.11.6
==> SIP
Disabled
==> Java
1.6.0_65-b14-468
==> Homebrew-Cask Install Location
<NONE>
==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (4076 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
==> Environment Variables
HOMEBREW_CASK_OPTS="--appdir=~/Applications/"
LC_ALL="en_US.UTF-8"
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/usr/local/bin/zsh"
Output of brew tap
$ brew tap
homebrew/boneyard
homebrew/cask
homebrew/completions
homebrew/core
homebrew/dupes
homebrew/versions
yudai/gotty
I thank you for your time, hard work and support. Great job for bringing such a great tool.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 5
- Comments: 16 (13 by maintainers)
Commits related to this issue
- travis: work around a 'quarantine' bug https://github.com/Homebrew/homebrew-cask/issues/51554#issuecomment-418215466 — committed to maelvls/homebrew-amc by maelvls 6 years ago
- travis: work around a 'quarantine' bug https://github.com/Homebrew/homebrew-cask/issues/51554#issuecomment-418215466 — committed to maelvls/homebrew-amc by maelvls 6 years ago
What an idiotic situation.
Gatekeeper is useless unless the downloading app sets a flag (seems a bit unsafe, but alright) and there’s no officially sanctioned way to set the flag after the fact (why?). So alright, we go out of our way to add the flag and improve security, but then apps enter into a special mode that requires moving the app with your mouse (er…). But wait! If you run a simple
xattrcommand, you can tell the whole security system to screw itself and don’t check anything (what?!).Basically: try to improve user security by leveraging the OS’s security model, and Apple will have you tripping the whole way. But if you’re a malicious actor trying to attack the user, right this way!
And have you been reading on Mojave? Seems like it’s getting even worse, asking for so many permissions, it looks like Vista.
@jake-hwll, we’re addressing this on Homebrew/brew#4796. In the meanwhile, you can use the
--no-quarantineflag to work around this.I’m having trouble with this as well. My outputs are nearly identical to the OPs but are there any I can provide that would be useful? I’m running OS X 10.11.6 with Xcode 8.2.1
@amyspark The
--no-quarantineargument doesn’t seem to be working on 10.13.6. Every application I install via cask has the quarantine flag, and appears to be running in TransLocation mode. This is breaking many applications for me, like 1Password, Google Chrome, and Bartender. They either don’t work or complain about not running in /Applications.It seems globally quarantining all cask applications is having a severe negative impact across the board. Unfortunately, the suggested workaround of
--no-quarantinedoesn’t appear to resolve the issue.The only way I’ve been able to restore functionality on a per-app basis is to remove the quarantine flag using
xattr -r -d com.apple.quarantine /Applications/nameOfAppHere.app. However, I read somewhere that Mojave 10.14 lacks the-rargument forxattr.Hope that helps.