AOSPAlliance / android-prepare-vendor

Set of scripts to automate AOSP compatible vendor blobs generation from factory images
25 stars 8 forks source link

Intermittent failures with curl and HTTP/2 downloads #60

Open nickrbogdanov opened 3 years ago

nickrbogdanov commented 3 years ago

More often than not, I get this error during the initial download:

[*] Setting output base to '/home/ubuntu/aosp/vendor/android-prepare-vendor/blueline/rq1a.210205.004'

--{ Google Terms and Conditions [1]
Downloading of the system image and use of the device software is subject to the
Google Terms of Service [2]. By continuing, you agree to the Google Terms of
Service [2] and Privacy Policy [3]. Your downloading of the system image and use
of the device software may also be subject to certain third-party terms of
service, which can be found in Settings > About phone > Legal information, or as
otherwise provided.

[1] https://developers.google.com/android/images#legal
[2] https://www.google.com/intl/en/policies/terms/
[3] https://www.google.com/intl/en/policies/privacy/

[?] I have read and agree with the above terms and conditions - ACKNOWLEDGE [y|n]: yes
[*] Downloading image from 'https://dl.google.com/dl/android/aosp/blueline-rq1a.210205.004-factory-3ab98ba8.zip'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1731M  100 1731M    0     0  71.7M      0  0:00:24  0:00:24 --:--:-- 70.5M
curl: (16) Error in the HTTP2 framing layer
[-] Images download failed

This may be related to https://github.com/curl/curl/issues/3750

My curl package is version 7.58.0-2ubuntu3.12 on Ubuntu 18.04.3 LTS. I have seen this on multiple systems.

My workaround was to put --http1.1 in ${HOME}/.curlrc. Perhaps HTTP/1.1 should be used by default until HTTP/2 is known to be stable?

dan-v commented 3 years ago

@nickrbogdanov I also hit this on Ubuntu 18.04. Just another data point, the version of curl that comes with Ubuntu 20.04 (not sure of version off top of my head) does not have these http2 issues.

chirayudesai commented 3 years ago

https://github.com/AOSPAlliance/android-prepare-vendor/pull/64 This just adds --http1.1 to the failing download, and seems to work fine.