homebrew-cask: brew cask upgrade / install fails with quarantine error

General troubleshooting steps

Description of issue

Cask upgrade fails for any cask that has an update. Installing a cask also fails with similar message. I’ve tried to install whatsapp for example. I tried to remove macupdate first and then reinstalled, which hasn’t helped. I followed all the directions above best i could. If I missed anything please let me know. I Googled to see if this was posted before and and came up empty.

Command that failed

○ → brew cask upgrade vlc
==> Upgrading 1 outdated package, with result:
vlc 3.0.4
==> Satisfying dependencies
==> Downloading https://get.videolan.org/vlc/3.0.4/macosx/vlc-3.0.4.dmg
Already downloaded: /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Verifying checksum for Cask vlc
==> Starting upgrade for Cask vlc
==> Backing App 'VLC.app' up to '/usr/local/Caskroom/vlc/3.0.3/VLC.app'.
==> Removing App '/Applications/VLC.app'.
==> Unlinking Binary '/usr/local/bin/vlc'.
hdiutil attach -plist -nobrowse -readonly -noidme -mountrandom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-tvq29f /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
mkbom -s -i /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23865-1d0ezv4.list -- /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23865-6ealqr.bom
ditto --bom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23865-6ealqr.bom -- /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-tvq29f/dmg.lT9mco /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-f0bka0
diskutil eject /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-tvq29f/dmg.lT9mco
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-f0bka0/VLC.app/. /usr/local/Caskroom/vlc/3.0.4/VLC.app
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-f0bka0/.background.tiff /usr/local/Caskroom/vlc/3.0.4/.background.tiff
==> Purging files for version 3.0.4 of Cask vlc
==> Purging files for version 3.0.4 of Cask vlc
Warning: Reverting upgrade for Cask vlc
==> Moving App 'VLC.app' to '/Applications/VLC.app'.
==> Linking Binary 'vlc.wrapper.sh' to '/usr/local/bin/vlc'.
Error: Failed to quarantine one or more files within /usr/local/Caskroom/vlc/3.0.4.

Output of command with --force --verbose --debug

○ → brew cask upgrade vlc --force --debug --verbose
==> Upgrading 1 outdated package, with result:
vlc 3.0.4
==> Started upgrade process for Cask vlc
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://get.videolan.org/vlc/3.0.4/macosx/vlc-3.0.4.dmg
Already downloaded: /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg is quarantined
==> Downloaded to -> /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Verifying download
==> Determining which verifications to run for Cask vlc
==> Checking for verification class Hbc::Verify::Checksum
==> 1 verifications defined
Hbc::Verify::Checksum
==> Running verification of class Hbc::Verify::Checksum
==> Verifying checksum for Cask vlc
==> SHA256 checksums match
==> Starting upgrade for Cask vlc
==> Un-installing artifacts
==> 4 artifact/s defined
#<SortedSet:0x000000010137c858>
==> Un-installing artifact of class Hbc::Artifact::PreflightBlock
==> Un-installing artifact of class Hbc::Artifact::App
==> Backing App 'VLC.app' up to '/usr/local/Caskroom/vlc/3.0.3/VLC.app'.
/bin/cp -pR /Applications/VLC.app /usr/local/Caskroom/vlc/3.0.3/VLC.app
==> Removing App '/Applications/VLC.app'.
==> Un-installing artifact of class Hbc::Artifact::Binary
==> Unlinking Binary '/usr/local/bin/vlc'.
==> Hbc::Installer#stage
hdiutil imageinfo /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Extracting primary container
==> Using container class UnpackStrategy::Dmg for /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
hdiutil attach -plist -nobrowse -readonly -noidme -mountrandom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-8wxp6s /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
find . -print0
mkbom -s -i /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23180-14c93na.list -- /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23180-10beo5c.bom
ditto --bom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23180-10beo5c.bom -- /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-8wxp6s/dmg.TRCZOV /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-1m20ync
diskutil eject /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-8wxp6s/dmg.TRCZOV
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-1m20ync/VLC.app/. /usr/local/Caskroom/vlc/3.0.4/VLC.app
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-1m20ync/.background.tiff /usr/local/Caskroom/vlc/3.0.4/.background.tiff
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg is quarantined
==> Propagating quarantine from /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg to /usr/local/Caskroom/vlc/3.0.4
/usr/bin/xattr -p com.apple.quarantine /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
/usr/bin/xattr -w -rs com.apple.quarantine 0081\;5b8aa63e\;Homebrew-Cask\;D59ABDBE-93B7-4B30-ACFD-01CACE2DF374 /usr/local/Caskroom/vlc/3.0.4
==> Purging files for version 3.0.4 of Cask vlc
==> Purging files for version 3.0.4 of Cask vlc
Warning: Reverting upgrade for Cask vlc
==> Installing artifacts
==> 4 artifact/s defined
#<SortedSet:0x000000010137c858>
==> Installing artifact of class Hbc::Artifact::PreflightBlock
==> Installing artifact of class Hbc::Artifact::App
==> Moving App 'VLC.app' to '/Applications/VLC.app'.
==> Installing artifact of class Hbc::Artifact::Binary
==> Linking Binary 'vlc.wrapper.sh' to '/usr/local/bin/vlc'.
/bin/ln -h -f -s -- /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh /usr/local/bin/vlc
==> Adding com.apple.metadata:kMDItemAlternateNames metadata
/usr/bin/xattr -p com.apple.metadata:kMDItemAlternateNames /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh
==> Existing metadata is: '("vlc"
, "vlc")
'
/bin/chmod -- u\+rw /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh
/usr/bin/xattr -w com.apple.metadata:kMDItemAlternateNames \(\(\"vlc\"'
',\ \"vlc\"\)'
',\ \"vlc\"\) /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh
Error: Failed to quarantine one or more files within /usr/local/Caskroom/vlc/3.0.4.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:77:in `propagate'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:191:in `extract_primary_container'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:75:in `stage'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb:73:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb:33:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb:33: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-102-g93430e6
Homebrew/homebrew-cask (git revision 8101f; last commit 2018-09-01)
==> macOS
10.14
==> SIP
Enabled
==> Java
N/A
==> Homebrew-Cask Install Location
<NONE>
==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (4041 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (195 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-drivers (152 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
LC_ALL="en_US.UTF-8"
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/usr/local/bin/bash"

Output of brew tap

○ → brew tap
homebrew/bundle
homebrew/cask
homebrew/cask-drivers
homebrew/cask-versions
homebrew/command-not-found
homebrew/completions
homebrew/core
homebrew/services
homebrew/versions

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 20 (17 by maintainers)

Commits related to this issue

Most upvoted comments

@LanikSJ, if you feel comfortable editing Homebrew’s source code…

I’m totally comfortable with Ruby / Python. I wouldn’t call myself and expert but I know a thing or two here and there.

○ → brew cask install macupdate --force --verbose --debug
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Migrating cache entries...
No changes to formulae.

==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://www.macupdate.com/mud-download
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.2-102-g93430e6-dirty\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14\)\ curl/7.54.0 --location --silent --head https://www.macupdate.com/mud-download
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.2-102-g93430e6-dirty\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14\)\ curl/7.54.0 --fail --location --remote-time --continue-at - --output /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip.incomplete https://www.macupdate.com/mud-download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11.3M  100 11.3M    0     0  16.1M      0 --:--:-- --:--:-- --:--:-- 16.1M
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip
Error: undefined local variable or method `quarantine_status' for Hbc::Quarantine:Module
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:35:in `status'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:26:in `detect'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:51: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:167:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:167: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>'

I was still able to install the above cask using the --no-quarantine option.

I’m sure I speak for most of the Brew users when I say we’re all very thankful for what all your maintainers do to keep the project alive. I may not be able to contribute Ruby / Python code (still learning), but I’ve been known to slay a few shell scripts. If there’s anything you guys need or I can help out in any other way just ask. 🙂

@LanikSJ , you can also work around the error by issuing the --no-quarantine flag:

brew cask upgrade --no-quarantine