Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew cask upgrade fails when cache directory is missing #46403

Closed
6 tasks done
jjeising opened this issue Apr 26, 2018 · 6 comments
Closed
6 tasks done

brew cask upgrade fails when cache directory is missing #46403

jjeising opened this issue Apr 26, 2018 · 6 comments
Labels
bug Issue describing a reproducible bug. core Issue with Homebrew itself rather than with a specific cask.

Comments

@jjeising
Copy link
Contributor

jjeising commented Apr 26, 2018

General troubleshooting steps

Description of issue

brew cask upgrade fails downloading if ~Library/Caches/Homebrew/Cask is missing. After manually creating the Cask folder it works fine again.

brew doctor or --force did not create the folder. It should be created before starting to download packages.

Command that failed

$ brew cask upgrade
==> Upgrading 11 outdated packages, with result:
…
==> Satisfying dependencies
==> Downloading …
Warning: Failed to create the file
Warning: ~/Library/Caches/Homebrew/Cask/….incomp
Warning: lete: No such file or directory

curl: (23) Failed writing body (0 != 16084)
==> Purging files for version … of Cask …
Error: Download failed on Cask '…' with message: Download failed: …

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

==> Upgrading 11 outdated packages, with result:
…
==> Started upgrade process for Cask …
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading …
/usr/bin/curl -q --show-error --user-agent Homebrew/1.6.2-33-g27ec9da (Macintosh; Intel Mac OS X 10.13.4) curl/7.54.0 --fail --location --remote-time --continue-at - --output ~/Library/Caches/Homebrew/Cask/….incomplete https://…
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file
Warning: ~/Library/Caches/Homebrew/Cask/….incomp
Warning: lete: No such file or directory
  0 23.7M    0 16084    0     0  62688      0  0:06:37 --:--:--  0:06:37 62828
curl: (23) Failed writing body (0 != 16084)
==> Purging files for version … of Cask …
Error: Download failed on Cask '…' with message: Download failed: …
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:42:in `rescue in fetch'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:40:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:15:in `perform'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:126:in `download'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:51:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb:56:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb:29:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb:29:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb:35:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:98:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:168:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:132:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:101:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:173:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:173:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:156:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:132:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:101:in `<main>'

Output of brew cask doctor

==> Homebrew-Cask Version
Homebrew-Cask 1.6.2-33-g27ec9da
caskroom/homebrew-cask (git revision 85020; last commit 2018-04-26)
==> macOS
10.13.4
==> SIP
Enabled
==> Java
10.0.1
==> Homebrew-Cask Install Location
<NONE>
==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads
~/Library/Caches/Homebrew/Cask
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask (3956 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-drivers (143 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-fonts (1160 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions (176 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-eid (11 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/universal-darwin9.0
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/bin/bash"

Output of brew tap

caskroom/cask
caskroom/drivers
caskroom/eid
caskroom/fonts
caskroom/versions
…
homebrew/bundle
homebrew/core
homebrew/dupes
homebrew/gui
homebrew/services
homebrew/versions
…
@commitay
Copy link
Contributor

Please post brew cask doctor

@jjeising
Copy link
Contributor Author

Please post brew cask doctor

Sorry, missed that. Fixed above.

@commitay
Copy link
Contributor

Reproducible. Only occurs with upgrade, not fetch, install or reinstall.

@commitay commitay added bug Issue describing a reproducible bug. awaiting maintainer feedback Issue needs response from a maintainer. core Issue with Homebrew itself rather than with a specific cask. labels Apr 26, 2018
@commitay commitay changed the title brew cask download fails when cache directory is missing brew cask upgrade fails when cache directory is missing Apr 26, 2018
@commitay
Copy link
Contributor

Just out of curiosity, why was the cache directory missing?

@jjeising
Copy link
Contributor Author

I didn't manually delete the directory. I tried reproducing this brew [cask] cleanup [-s] but the directory did not disappear. So I'm not sure. I think this has happened before, but as [re]install seems to restore it the issue might have been not immediately visible for me.

@saagarjha
Copy link
Contributor

I'm seeing this issue as well. For some reason Travis CI seems to not have a cache folder for Homebrew Cask, which causes all brew upgrades to fail.

@commitay commitay removed the awaiting maintainer feedback Issue needs response from a maintainer. label May 17, 2018
@Homebrew Homebrew locked and limited conversation to collaborators Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue describing a reproducible bug. core Issue with Homebrew itself rather than with a specific cask.
Projects
None yet
Development

No branches or pull requests

3 participants