Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.71k forks source link

Brew cask attempts download from incorrect URL #86614

Closed arielelkin closed 4 years ago

arielelkin commented 4 years ago

General troubleshooting steps

Description of issue

The formula in question is Blackhole.

brew cask install blackhole

work fine on my machine but on CI it systematically fails.

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

% brew update && brew cask install blackhole --force --verbose --debug
Already up-to-date.
==> Downloading https://github.com/ExistentialAudio/BlackHole/releases/download/v0.2.6/BlackHole.v0.2.6.pkg
##O#- #                                                                       
curl: (22) The requested URL returned error: 404 Not Found
Error: Download failed on Cask 'blackhole' with message: Download failed: https://github.com/ExistentialAudio/BlackHole/releases/download/v0.2.6/BlackHole.v0.2.6.pkg

Output of brew cask doctor

% brew cask doctor
==> Homebrew Version
2.4.8
==> macOS
10.15.5
==> SIP
Disabled
==> Java
1.8.0_252
==> xattr issues
<NONE>
==> Gatekeeper support
Enabled
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3553 casks)
/usr/local/Homebrew/Library/Taps/bitrise-io/homebrew-cask-versions (153 casks)
/usr/local/Homebrew/Library/Taps/wix/homebrew-brew (1 cask)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-1.42.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.7.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rexml-3.2.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.3.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby
/Library/Ruby/Site/2.6.0
/Library/Ruby/Site/2.6.0/universal-darwin19
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/universal-darwin19
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19
/usr/local/Homebrew/Library/Homebrew
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin"
SHELL="/bin/zsh"

Output of brew tap

% brew tap
bitrise-io/cask-versions
homebrew/cask
homebrew/core
wix/brew
vitorgalvao commented 4 years ago

The formula in question

Cask.

work fine on my machine but on CI it systematically fails.

Give us an example. I’m not sure what you’re calling “CI”, but your example isn’t it.

Have you ever installed the cask before?

arielelkin commented 4 years ago

Yes, I'm able to install the cask on my local machine, but the installation fails on my other machine (my "CI" machine, on which I run my continuous integration builds). Output on my machine:

$ brew cask install blackhole                                    
Warning: Cask 'blackhole' is already installed.

To re-install blackhole, run:
  brew cask reinstall blackhole

output on my CI machine:

% brew update && brew cask install blackhole --force --verbose --debug
Already up-to-date.
==> Downloading https://github.com/ExistentialAudio/BlackHole/releases/download/v0.2.6/BlackHole.v0.2.6.pkg
##O#- #                                                                       
curl: (22) The requested URL returned error: 404 Not Found
Error: Download failed on Cask 'blackhole' with message: Download failed: https://github.com/ExistentialAudio/BlackHole/releases/download/v0.2.6/BlackHole.v0.2.6.pkg
vitorgalvao commented 4 years ago

Clearly something went wrong on the other machine, because that’s not the URL on the cask. Perhaps it’s stuck and unable to update Homebrew itself. I’d nuke and try again, or at least untap and retap the repo.

Without steps to reproduce and it only failing on one machine, not much we can do.