Homebrew / homebrew-cask

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

Error: No valid file found at either of: <snip>/j.rb #141683

Closed genos closed 1 year ago

genos commented 1 year ago

Verification

Description of issue

The J programming language cask from jsoftware.com no longer works. brew info j throws an error (see below), plus that same error arises when trying other various brew commands unrelated to the cask in question. For example, you'll see I have some deprecated/disabled formulae via the brew doctor output below, but I can't run brew uninstall llvm@9 or brew uninstall proj@7 because this same error causes them to crash.

Command that failed

brew info j

Output of command with --verbose --debug

/usr/local/Homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading j
/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.3-54-g5272640\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 13.2.1\)\ curl/7.86.0 --header Accept-Language:\ en --retry 3 --fail https://raw.githubusercontent.com/Homebrew/homebrew-cask/f2c0c21ce347290f317d8fdfc4fc972232b06e6f/Casks/j.rb
/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.3-54-g5272640\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 13.2.1\)\ curl/7.86.0 --header Accept-Language:\ en --retry 3 --fail https://formulae.brew.sh/api/cask-source/j.rb
Error: No valid file found at either of:
https://raw.githubusercontent.com/Homebrew/homebrew-cask/f2c0c21ce347290f317d8fdfc4fc972232b06e6f/Casks/j.rb
https://formulae.brew.sh/api/cask-source/j.rb
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/api.rb:111:in `fetch_homebrew_cask_source'
/usr/local/Homebrew/Library/Homebrew/api/cask.rb:25: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/cli/named_args.rb:129:in `load_formula_or_cask'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:85:in `block in to_formulae_and_casks_and_unavailable'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:84:in `map'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:84:in `to_formulae_and_casks_and_unavailable'
/usr/local/Homebrew/Library/Homebrew/cmd/info.rb:155:in `print_info'
/usr/local/Homebrew/Library/Homebrew/cmd/info.rb:118:in `info'
/usr/local/Homebrew/Library/Homebrew/brew.rb:93: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:
  llvm@9
  proj@7

$ brew config

HOMEBREW_VERSION: 4.0.3-54-g5272640
ORIGIN: https://github.com/Homebrew/brew
HEAD: 5272640cfc716a160cfb29b8dbe9c084c935486a
Last commit: 18 minutes ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: c360bbd3ea099dd2d139758365a9bccdf4362d62
Core tap last commit: 32 minutes ago
Core tap branch: master
Core tap JSON: 22 Feb 14:38 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: nvim
HOMEBREW_MAKE_JOBS: 16
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 16-core 64-bit kabylake
Clang: 14.0.0 build 1400
Git: 2.37.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.86.0 => /usr/bin/curl
macOS: 13.2.1-x86_64
CLT: 14.2.0.0.1.1668646533
Xcode: 14.2

Output of brew tap

candid82/brew
clojure/tools
homebrew/cask
homebrew/cask-versions
homebrew/core
souffle-lang/souffle
universal-ctags/universal-ctags
carlocab commented 1 year ago

What's the output of

curl -LI \
  https://raw.githubusercontent.com/Homebrew/homebrew-cask/f2c0c21ce347290f317d8fdfc4fc972232b06e6f/Casks/j.rb \
  https://formulae.brew.sh/api/cask-source/j.rb

?

Can you access either URL in your browser?

genos commented 1 year ago

Thanks for looking into this!

Both are Killed: 9, which man curl suggests corresponds to "FTP access denied."

The former, raw.githubusercontent.com link doesn't exist; GitHub yields a 404: Not Found in the browser. The latter one is accessible and leads to what, to my untrained inexpert eyes, looks like a valid Homebrew Ruby script.

Bo98 commented 1 year ago

Killed: 9 is often a code signing issue (broken curl?). Does the same thing happen with /usr/bin/curl directly?

genos commented 1 year ago

/usr/bin/curl is the curl my laptop uses (via type curl).

I was able to use curl to grab https://example.com, so it’s not totally borked.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

genos commented 1 year ago

The only “fix” I could come up with was manually rming anything involved in the cask.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.