homebrew-cask: No file found - failure to upgrade (multiple casks affected)

the issue happens also in brew outdated

brew uninstall gimp
Error: No file found at https://raw.githubusercontent.com/Homebrew/homebrew-cask/cc58401c0905753619a9fc12dc733518beb75b05/Casks/gimp.rb
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/opt/homebrew/Library/Homebrew/api.rb:105:in `fetch_file_source'
/opt/homebrew/Library/Homebrew/api/cask.rb:20:in `fetch_source'
/opt/homebrew/Library/Homebrew/cask/cask_loader.rb:236:in `load'
/opt/homebrew/Library/Homebrew/cask/cask_loader.rb:376:in `load'
/opt/homebrew/Library/Homebrew/cli/named_args.rb:129:in `load_formula_or_cask'
/opt/homebrew/Library/Homebrew/cli/named_args.rb:57:in `block in to_formulae_and_casks'
/opt/homebrew/Library/Homebrew/cli/named_args.rb:56:in `each'
/opt/homebrew/Library/Homebrew/cli/named_args.rb:56:in `flat_map'
/opt/homebrew/Library/Homebrew/cli/named_args.rb:56:in `to_formulae_and_casks'
/opt/homebrew/Library/Homebrew/cli/named_args.rb:273:in `to_kegs_to_casks'
/opt/homebrew/Library/Homebrew/cmd/uninstall.rb:48:in `uninstall'
/opt/homebrew/Library/Homebrew/brew.rb:93:in `<main>'

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 13
  • Comments: 34 (17 by maintainers)

Most upvoted comments

Though this seems more like a workaround than a fix.

We’re working on a real/better fix.

I’ve made a mitigation here that may have fixed things. Please don’t set export HOMEBREW_NO_INSTALL_FROM_API=1 but try again and, if you still see errors after I posted this message, let me know if this is a problem.

Please see https://github.com/Homebrew/homebrew-cask/issues/141436#issuecomment-1432900362


There is a workaround, found at https://github.com/Homebrew/brew/issues/14542

export HOMEBREW_NO_INSTALL_FROM_API=1

That seems to be a direct result of 4.0.0 release: https://brew.sh/2023/02/16/homebrew-4.0.0/ Weirdly, is says:

[…] the HOMEBREW_INSTALL_FROM_API variable has been removed and is a no-op

If you wish to opt-out of this behaviour change, you can export HOMEBREW_NO_INSTALL_FROM_API=1

I guess the first sentence is wrong because that workaround worked for me 🤷

I’m having the same issue with the firefox cask when running brew autoremove

Error: No file found at https://raw.githubusercontent.com/Homebrew/homebrew-cask/cc58401c0905753619a9fc12dc733518beb75b05/Casks/firefox.rb
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/api.rb:105:in `fetch_file_source'
/usr/local/Homebrew/Library/Homebrew/api/cask.rb:20:in `fetch_source'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:236:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:376:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/caskroom.rb:50:in `block in casks'
/usr/local/Homebrew/Library/Homebrew/cask/caskroom.rb:46:in `map'
/usr/local/Homebrew/Library/Homebrew/cask/caskroom.rb:46:in `casks'
/usr/local/Homebrew/Library/Homebrew/cleanup.rb:578:in `autoremove'
/usr/local/Homebrew/Library/Homebrew/cmd/autoremove.rb:25:in `autoremove'
/usr/local/Homebrew/Library/Homebrew/brew.rb:93:in `<main>'

Seems to be fixed for me after running brew update

@carlocab

GitHub has pushed a mitigation on their side. Please let us know if you’re still having this problem. You’ll need to do unset HOMEBREW_NO_INSTALL_FROM_API to try to trigger it.

This is the work around

export HOMEBREW_NO_INSTALL_FROM_API=1

Also affects osxfuse

Error: No file found at https://raw.githubusercontent.com/Homebrew/homebrew-cask/cc58401c0905753619a9fc12dc733518beb75b05/Casks/osxfuse.rb