brew: Cask 'stats' is unavailable: No Cask with this name exists.

Verification

Description of issue

Trying to upgrade cask stats from 2.8.5 to 2.8.6, got error Cask 'stats' is unavailable: No Cask with this name exists..

$ brew update-reset
... # (no error)

$ brew update
Already up-to-date.

$ brew outdated --cask --greedy
stats (2.8.5) != 2.8.6

$ $ brew upgrade -d -v --cask --greedy stats
/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.6.20-146-g4b3d64d\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.2\)\ curl/7.86.0 --header Accept-Language:\ en --fail --max-time 5 --retry 3 --location --remote-time --output /Users/zacklin/Library/Caches/Homebrew/api/formula.json --time-cond /Users/zacklin/Library/Caches/Homebrew/api/formula.json --compressed --silent https://formulae.brew.sh/api/formula.json
/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.6.20-146-g4b3d64d\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.2\)\ curl/7.86.0 --header Accept-Language:\ en --max-time 5 --retry 3 --fail https://formulae.brew.sh/api/cask-source/stats.rb
/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.6.20-146-g4b3d64d\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.2\)\ curl/7.86.0 --header Accept-Language:\ en --fail --max-time 5 --retry 3 --location --remote-time --output /Users/zacklin/Library/Caches/Homebrew/api/cask.json --time-cond /Users/zacklin/Library/Caches/Homebrew/api/cask.json --compressed --silent https://formulae.brew.sh/api/cask.json
==> Upgrading 1 outdated package:
/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.6.20-146-g4b3d64d\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.2\)\ curl/7.86.0 --header Accept-Language:\ en --max-time 5 --retry 3 --fail https://formulae.brew.sh/api/cask-source//opt/homebrew/Caskroom/stats/.metadata/2.8.5/20230124190602.001/Casks/stats.rb.rb
Error: Cask 'stats' is unavailable: No Cask with this name exists.
/opt/homebrew/Library/Homebrew/cask/cask_loader.rb:342:in `load'
/opt/homebrew/Library/Homebrew/cask/cask_loader.rb:351:in `load'
/opt/homebrew/Library/Homebrew/cask/cmd/upgrade.rb:149:in `block in upgrade_casks'
/opt/homebrew/Library/Homebrew/cask/cmd/upgrade.rb:149:in `map'
/opt/homebrew/Library/Homebrew/cask/cmd/upgrade.rb:149:in `upgrade_casks'
/opt/homebrew/Library/Homebrew/cmd/upgrade.rb:226:in `upgrade_outdated_casks'
/opt/homebrew/Library/Homebrew/cmd/upgrade.rb:117:in `upgrade'
/opt/homebrew/Library/Homebrew/brew.rb:105:in `<main>'

Command that failed

brew upgrade --cask --greedy stats

Output of command with --verbose --debug

/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.6.20-146-g4b3d64d\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.2\)\ curl/7.86.0 --header Accept-Language:\ en --fail --max-time 5 --retry 3 --location --remote-time --output /Users/zacklin/Library/Caches/Homebrew/api/formula.json --time-cond /Users/zacklin/Library/Caches/Homebrew/api/formula.json --compressed --silent https://formulae.brew.sh/api/formula.json
/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.6.20-146-g4b3d64d\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.2\)\ curl/7.86.0 --header Accept-Language:\ en --max-time 5 --retry 3 --fail https://formulae.brew.sh/api/cask-source/stats.rb
/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.6.20-146-g4b3d64d\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.2\)\ curl/7.86.0 --header Accept-Language:\ en --fail --max-time 5 --retry 3 --location --remote-time --output /Users/zacklin/Library/Caches/Homebrew/api/cask.json --time-cond /Users/zacklin/Library/Caches/Homebrew/api/cask.json --compressed --silent https://formulae.brew.sh/api/cask.json
==> Upgrading 1 outdated package:
/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.6.20-146-g4b3d64d\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.2\)\ curl/7.86.0 --header Accept-Language:\ en --max-time 5 --retry 3 --fail https://formulae.brew.sh/api/cask-source//opt/homebrew/Caskroom/stats/.metadata/2.8.5/20230124190602.001/Casks/stats.rb.rb
Error: Cask 'stats' is unavailable: No Cask with this name exists.
/opt/homebrew/Library/Homebrew/cask/cask_loader.rb:342:in `load'
/opt/homebrew/Library/Homebrew/cask/cask_loader.rb:351:in `load'
/opt/homebrew/Library/Homebrew/cask/cmd/upgrade.rb:149:in `block in upgrade_casks'
/opt/homebrew/Library/Homebrew/cask/cmd/upgrade.rb:149:in `map'
/opt/homebrew/Library/Homebrew/cask/cmd/upgrade.rb:149:in `upgrade_casks'
/opt/homebrew/Library/Homebrew/cmd/upgrade.rb:226:in `upgrade_outdated_casks'
/opt/homebrew/Library/Homebrew/cmd/upgrade.rb:117:in `upgrade'
/opt/homebrew/Library/Homebrew/brew.rb:105:in `<main>'

Output of brew doctor and brew config

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  redis@6.2

Warning: The filesystem on /System/Volumes/Data appears to be case-sensitive.
The default macOS filesystem is case-insensitive. Please report any apparent problems.

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  kubernetes-cli

$ brew config
HOMEBREW_VERSION: 3.6.20-146-g4b3d64d
ORIGIN: https://github.com/Homebrew/brew
HEAD: 4b3d64d307c8aa7f364c3f854a0b4dc29d59ecd0
Last commit: 30 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: b53ed519c7187a6c5498f1a9e74d1cc7eaae3abb
Core tap last commit: 25 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: code
HOMEBREW_INSTALL_FROM_API: set
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.39.1 => /opt/homebrew/bin/git
Curl: 7.86.0 => /usr/bin/curl
macOS: 13.2-arm64
CLT: 14.2.0.0.1.1668646533
Xcode: N/A
Rosetta 2: false

Output of brew tap

$ brew tap
aquasecurity/trivy
bufbuild/buf
gabrie30/utils
homebrew/cask
homebrew/core
homebrew/services
ngrok/ngrok
teamookla/speedtest

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 8
  • Comments: 20 (5 by maintainers)

Most upvoted comments

@dmlemos Until this bug is squashed, try running brew reinstall <token> when you encounter this issue and the latest version should be installed for you.

Similar for me: As mentioned by @gromgit in his comment https://github.com/Homebrew/brew/issues/14463#issuecomment-1408652632, I fixed by issue with the signal cask doing the following:

Run brew readall homebrew/cask to start.

If it errored out, run the following (this will remove any changes you’ve made in the tap):

brew untap --force homebrew/cask
brew tap homebrew/cask

Otherwise, if it ran through, run the following to manually delete the stale installation data and reinstall the cask:

rm -fr /opt/homebrew/Caskroom/signal
brew reinstall --cask --force signal

This might be related to changes that GIthub made to compression (and subsequently hashing) of automatically generated archives and other issues related to download URLs.

@KoheiKanagu that is a known issue at Homebrew/brew/issues/14489 related to Github pages.

@Rylan12 FYI you closed the issue yesterday, it looks to be a problem still.

@miccal I have tried that before, but sadly it doesn’t work.