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

Error: Cask 'kicad-nightly' is unreadable: undefined method `method_missing_message' for Utils:Module #86688

Closed ppannuto closed 4 years ago

ppannuto commented 4 years ago

General troubleshooting steps

Description of issue

Brew doctor fails with an error and no path for resolution.

Command that failed

brew doctor

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

n.b. force omitted as it is not a valid flag for doctor

$ brew doctor --verbose --debug
Error: Cask 'kicad-nightly' is unreadable: undefined method `method_missing_message' for Utils:Module
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:66:in `rescue in load'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:61:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/caskroom.rb:38:in `block in casks'
/usr/local/Homebrew/Library/Homebrew/cask/caskroom.rb:32:in `map'
/usr/local/Homebrew/Library/Homebrew/cask/caskroom.rb:32:in `casks'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:49:in `doctor'
/usr/local/Homebrew/Library/Homebrew/brew.rb:111:in `<main>'

Output of brew cask doctor

$ brew cask doctor
==> Homebrew Version
2.4.9-32-gb0c5991
==> macOS
10.15.6
==> SIP
Enabled
==> Java
1.8.0_25, 1.7.0_45
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3628 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (157 casks)
==> $LOAD_PATHS
/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.1/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.5/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
==> Cask Environment Variables:
BUNDLE_PATH
CHRUBY_VERSION
GEM_HOME
GEM_PATH
HOMEBREW_CASK_OPTS
LC_ALL
PATH
RBENV_VERSION
RUBYLIB
RUBYOPT
RUBYPATH
SHELL

Output of brew tap

$ brew tap
armmbed/formulae
grafana/grafana
homebrew/cask
homebrew/cask-versions
homebrew/core
riscv/riscv
runtimeco/mynewt
spl/pdftk

Possibly similar to https://github.com/Homebrew/homebrew-cask/issues/75358, which appears to have been an error with the formula -- perhaps the same applies here?

vitorgalvao commented 4 years ago

We no longer have such a cask, which means you’re either reading it from one of the other taps, or something changed internally that made in unreadable.

Seeing as we no longer support the cask, the recommendation is that you uninstall it.

ppannuto commented 4 years ago

For any coming across this in the future, it seems that a plain uninstall of old formulae has issues, but tacking on a --force will make things happy:

$ brew cask uninstall kicad-nightly
Warning: Unexpected method 'license' called on Cask kicad-nightly.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Warning: Unexpected method 'license' called on Cask kicad-nightly.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
==> Uninstalling Cask kicad-nightly
Error: It seems there is already an App Suite at '/usr/local/Caskroom/kicad-nightly/r6979.20160714-060715/Kicad'.

$ brew cask uninstall --force kicad-nightly
Warning: Unexpected method 'license' called on Cask kicad-nightly.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Warning: Unexpected method 'license' called on Cask kicad-nightly.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
==> Uninstalling Cask kicad-nightly
Warning: It seems there is already an App Suite at '/usr/local/Caskroom/kicad-nightly/r6979.20160714-060715/Kicad'; overwriting.
==> Removing App Suite '/usr/local/Caskroom/kicad-nightly/r6979.20160714-060715/Kicad'
==> Backing App Suite 'Kicad' up to '/usr/local/Caskroom/kicad-nightly/r6979.20160714-
==> Removing App Suite '/Applications/Kicad'.
Warning: It seems there is already a Generic Artifact at '/usr/local/Caskroom/kicad-nightly/r6979.20160714-060715/kicad'; overwriting.
==> Removing Generic Artifact '/usr/local/Caskroom/kicad-nightly/r6979.20160714-060715
==> Backing Generic Artifact 'kicad' up to '/usr/local/Caskroom/kicad-nightly/r6979.20
==> Removing Generic Artifact '/Users/ppannuto/Library/Application Support/kicad'.
==> Purging files for version r6979.20160714-060715 of Cask kicad-nightly

brew doctor does again work for me after uninstalling this.

vitorgalvao commented 4 years ago

Warning: Unexpected method 'license' called on Cask kicad-nightly.

You had a really old install.