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

Brew cask install betterzip fails on curl error #81435

Closed JulesCornelissen closed 4 years ago

JulesCornelissen commented 4 years ago

General troubleshooting steps

Description of issue

Trying to run brew cask install betterzip fails with the following error:

==> Downloading https://macitbetter.com/dl/BetterZip-4.2.5.zip
##O=#  #                                                                      
curl: (16) Error in the HTTP2 framing layer
Error: Download failed on Cask 'betterzip' with message: Download failed: https://macitbetter.com/dl/BetterZip-4.2.5.zip

The file, using the same URL, does download when visited using Safari. Because of this I'm opening this issue, since the URL is correct and works. I also do not have a .curlrc config file. Here the following is noted: If you’re sure the issue is not with your connection, contact the app’s vendor and let them know their link is down, so they can fix it., however, as stated above the link is not down.

If I still shouldn't have opened an issue then I apologise in advance.

Command that failed

brew cask install betterzip

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

==> Cask::Installer#install
==> Printing caveats
==> Cask::Installer#fetch
==> Downloading
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.2.13\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.4\)\ curl/7.64.1 --retry 3 --location --silent --head --request GET https://macitbetter.com/dl/BetterZip-4.2.5.zip
==> Downloading https://macitbetter.com/dl/BetterZip-4.2.5.zip
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.2.13\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.4\)\ curl/7.64.1 --retry 3 --location --range 0-1 --dump-header - --write-out \%\{http_code\} --output /dev/null https://macitbetter.com/dl/BetterZip-4.2.5.zip
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.2.13\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.4\)\ curl/7.64.1 --fail --progress-bar --retry 3 --location --remote-time --continue-at 0 --output /Users/jules/Library/Caches/Homebrew/downloads/a8eb0769f25b3d5386467dc0f3ee3b3cffb3b1d0b3136219ffc0556ec2ebab40--BetterZip-4.2.5.zip.incomplete https://macitbetter.com/dl/BetterZip-4.2.5.zip
##O=#  #                                                                      
curl: (16) Error in the HTTP2 framing layer
Error: Download failed on Cask 'betterzip' with message: Download failed: https://macitbetter.com/dl/BetterZip-4.2.5.zip
/usr/local/Homebrew/Library/Homebrew/download_strategy.rb:311:in `rescue in fetch'
/usr/local/Homebrew/Library/Homebrew/download_strategy.rb:308:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/download.rb:42:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/download.rb:20:in `perform'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:152:in `download'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:62:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:90:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:22:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:16:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:16:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:36:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:150:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:92:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:9:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:155:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:155:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:140:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:92:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:9:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'

Output of brew cask doctor

==> Homebrew Version
2.2.13
==> macOS
10.15.4
==> SIP
Enabled
==> Java
N/A
==> xattr issues
<NONE>
==> Gatekeeper support
Enabled
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3538 casks)
==> Contents of $LOAD_PATH
/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.38.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.5.2/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.2.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.3.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.2/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
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin"
SHELL="/bin/zsh"

Output of brew tap

beeftornado/rmtree
homebrew/cask
homebrew/core
miccal commented 4 years ago

Might have been a temporary issue, as it seems to be fine now:

-bash-5.0.17- /Users/miccal (33) [> brew cask fetch betterzip

==> Downloading external files for Cask betterzip
==> Downloading https://macitbetter.com/dl/BetterZip-4.2.5.zip
==> Downloading from https://macitbetter.s3.amazonaws.com/BetterZip-4.2.5.zip
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'betterzip'.
==> Success! Downloaded to -> /Users/miccal/Library/Caches/Homebrew/downloads/a8eb0769f25b3d5386467dc0f3ee3b3cffb3b1d0b3136219ffc0556ec2ebab40--BetterZip-4.2.5.zip
JulesCornelissen commented 4 years ago

I tried yesterday and waited for a day before opening this issue since I thought it might've been a temporary issue. However, I tried again just now (after your reply) and it's still not working here.

Are you perhaps on Linux or on a different version of macOS? I'm on macOS 10.15.4 (latest as of writing) with stock curl.

curl -V output: curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2 Release-Date: 2019-03-27

If so, then perhaps it might be a curl issue and thus have nothing to do with Homebrew Cask.

miccal commented 4 years ago

Cask is for macOS only, and I am running 10.15.4. The only difference is that I use curl installed via brew:

-bash-5.0.17- /Users/miccal (33) [> curl --version
curl 7.69.1 (x86_64-apple-darwin19.3.0) libcurl/7.69.1 SecureTransport zlib/1.2.11
Release-Date: 2020-03-11
ran-dall commented 4 years ago

@JulesCornelissen @miccal I believe we've ran into this issue before. Most of the time it's on the server-side and there's not much we can do. FWIW it doesn't work form me either.

ping @vitorgalvao and @core-code, for second opinions.

vitorgalvao commented 4 years ago

Also failing for me, even with HB curl.

curl: (16) Error in the HTTP2 framing layer

Searching for that might provide some clues, because that’s a curl error, not HBC’s.

core-code commented 4 years ago

i‘ve seen infrequent 'Error in the HTTP2 framing layer' errors too. but i never had any 3rd party curl/wget installed. sometimes others have not been able to reproduce it so i thought it may be related to isp/backbone...

ran-dall commented 4 years ago

Searching for that might provide some clues, because that’s a curl error, not HBC’s.

@vitorgalvao I've pasted the output of my curl command below. It seems to me like a server issue.

$curl -L -v -o BetterZip.zip https://macitbetter.com/dl/BetterZip-4.2.5.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 216.92.78.194:443...
* TCP_NODELAY set
* Connected to macitbetter.com (216.92.78.194) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /Users/draque/.asdf/installs/python/anaconda3-2020.02/ssl/cacert.pem
  CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [108 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [4367 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: OU=Domain Control Validated; OU=Hosted by pair Networks; OU=COMODO SSL; CN=www.macitbetter.com
*  start date: Feb 16 00:00:00 2018 GMT
*  expire date: Feb 20 23:59:59 2021 GMT
*  subjectAltName: host "macitbetter.com" matched cert's "macitbetter.com"
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO RSA Domain Validation Secure Server CA
*  SSL certificate verify ok.
} [5 bytes data]
> GET /dl/BetterZip-4.2.5.zip HTTP/1.1
> Host: macitbetter.com
> User-Agent: curl/7.68.0
> Accept: */*
>
{ [5 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 302 Found
< Date: Mon, 27 Apr 2020 14:28:26 GMT
< Server: Apache
< Location: https://macitbetter.com/BetterZip.zip
< Content-Length: 221
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
{ [221 bytes data]
100   221  100   221    0     0    675      0 --:--:-- --:--:-- --:--:--   677
* Connection #0 to host macitbetter.com left intact
* Issue another request to this URL: 'https://macitbetter.com/BetterZip.zip'
* Found bundle for host macitbetter.com: 0x7f919b41b5f0 [serially]
* Re-using existing connection! (#0) with host macitbetter.com
* Connected to macitbetter.com (216.92.78.194) port 443 (#0)
} [5 bytes data]
> GET /BetterZip.zip HTTP/1.1
> Host: macitbetter.com
> User-Agent: curl/7.68.0
> Accept: */*
>
{ [5 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 302 Found
< Date: Mon, 27 Apr 2020 14:28:26 GMT
< Server: Apache
< Location: https://macitbetter.s3.amazonaws.com/BetterZip-4.2.5.zip
< Content-Length: 240
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
{ [240 bytes data]
100   240  100   240    0     0    595      0 --:--:-- --:--:-- --:--:--   595
* Connection #0 to host macitbetter.com left intact
* Issue another request to this URL: 'https://macitbetter.s3.amazonaws.com/BetterZip-4.2.5.zip'
*   Trying 52.217.42.52:443...
* TCP_NODELAY set
* Connected to macitbetter.s3.amazonaws.com (52.217.42.52) port 443 (#1)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /Users/draque/.asdf/installs/python/anaconda3-2020.02/ssl/cacert.pem
  CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [91 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2900 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=*.s3.amazonaws.com
*  start date: Nov  9 00:00:00 2019 GMT
*  expire date: Mar 12 12:00:00 2021 GMT
*  subjectAltName: host "macitbetter.s3.amazonaws.com" matched cert's "*.s3.amazonaws.com"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert Baltimore CA-2 G2
*  SSL certificate verify ok.
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0} [5 bytes data]
> GET /BetterZip-4.2.5.zip HTTP/1.1
> Host: macitbetter.s3.amazonaws.com
> User-Agent: curl/7.68.0
> Accept: */*
>
{ [5 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< x-amz-id-2: vz0f9atIUFT2bzCNtqEkRV0QIGkZfzB3HrS8biCbFGH23SgaMLy7V6EP+edhESUoRTB7lRRafjo=
< x-amz-request-id: 05492EEB8C393B5E
< Date: Mon, 27 Apr 2020 14:28:28 GMT
< Last-Modified: Tue, 08 Oct 2019 08:25:46 GMT
< ETag: "1493b329c4bbc7dab109e76153054f5e"
< Accept-Ranges: bytes
< Content-Type: application/zip
< Content-Length: 12505592
< Server: AmazonS3
<
{ [5 bytes data]
100 11.9M  100 11.9M    0     0  2605k      0  0:00:04  0:00:04 --:--:-- 3046k
* Connection #1 to host macitbetter.s3.amazonaws.com left intact
miccal commented 4 years ago
-bash-5.0.17- /Users/miccal (33) [> curl -sLI BetterZip.zip https://macitbetter.com/dl/BetterZip-4.2.5.zip | grep -i Location
Location: https://macitbetter.com/BetterZip.zip
Location: https://macitbetter.s3.amazonaws.com/BetterZip-4.2.5.zip

Perhaps changing the url to https://macitbetter.s3.amazonaws.com/BetterZip-#{version}.zip may help.

core-code commented 4 years ago

while we are on this topic, anyone else get the very same error (Error in the HTTP2 framing layer) for the cask 'expressions'?

==> Downloading external files for Cask expressions
==> Downloading https://www.apptorium.com/public/products/expressions/releases/Expressions-1.3.3.zip
######################################################################## 100.0%
curl: (16) Error in the HTTP2 framing layer
Error: Download failed on Cask 'expressions' with message: Download failed: https://www.apptorium.com/public/products/expressions/releases/Expressions-1.3.3.zip
miccal commented 4 years ago

@core-code it seems fine for me:

-bash-5.0.17- /Users/miccal (32) [> brew cask fetch expressions

==> Downloading external files for Cask expressions
==> Downloading https://www.apptorium.com/public/products/expressions/releases/Expressions-1.3.3.zip
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'expressions'.
==> Success! Downloaded to -> /Users/miccal/Library/Caches/Homebrew/downloads/9a3e06a789357713d48b989a8e071a40db50b9
core-code commented 4 years ago

fascinating

miccal commented 4 years ago

@core-code my brew config for your information:

-bash-5.0.17- /Users/miccal (32) [> brew config
HOMEBREW_VERSION: 2.2.15-10-g316da98
ORIGIN: https://github.com/Homebrew/brew
HEAD: 316da98140832b08e538a623b34f9cd52de9dd35
Last commit: 5 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 5385708f6ea5814f8fce0c8ca38049bfb2bfe646
Core tap last commit: 67 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEVELOPER: set
HOMEBREW_EDITOR: /usr/bin/open -e -W
HOMEBREW_FORCE_BREWED_CURL: set
HOMEBREW_FORCE_BREWED_GIT: set
HOMEBREW_FORCE_VENDOR_RUBY: set
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_ANALYTICS: set
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/bin/ruby
Clang: 11.0 build 1103
Git: 2.26.2 => /usr/local/opt/git/bin/git
Curl: 7.70.0 => /usr/local/opt/curl/bin/curl
macOS: 10.15.4-x86_64
CLT: 11.4.1.0.1.1586360307
Xcode: N/A
JulesCornelissen commented 4 years ago

FWIW it works fine here as well:

~ % brew cask fetch expressions

==> Downloading external files for Cask expressions
==> Downloading https://www.apptorium.com/public/products/expressions/releases/Expressions-1.3.3.zip
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'expressions'.
==> Success! Downloaded to -> /Users/[...]