-
Notifications
You must be signed in to change notification settings - Fork 914
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
component download failed for rustc: error decoding response body #4132
Comments
Just noting in case anyone else is having this issue: It hasn't happened while I've been on more stable internet, but it does keep happening on the unstable one. If you're experiencing this, your best fix is getting a more reliable internet connection. If you can't, you can use the workaround I did by downloading with Curl and locally serving files with any random HTTP server, including Without knowing anything about how Rustup works internally, I think the best code fix here is to either figure out why Curl isn't being interrupted but Rustup is, or just add download caching, including partial downloads, using Range to retry just the missing parts of files. That also adds the benefit of not having to redownload every file when one component breaks... |
@nic-hartley Just to clarify, we do have download resuming in Rustup today. However, I think you might have encountered a case where that cache got invalidated, and if so, we would need to fix that part of the business logic. |
Huh! Testing again and looking more carefully: You're right! If I ctrl+c a |
For me, this seems to be related to http proxies. I am on a corporate network, and I would get something like this repeatedly:
Proxy settings like this (root domain changed):
Once I connected to my phone as a mobile hotspot, avoiding all proxy issues, I downloaded without issues. |
Verification
Problem
After downloading around 40MiB (the exact amount varies, but that might just be because the progress bar isn't updated one final time on error?) rustc always fails. All other downloads succeed, though I've seen sporadic failures in other components too.
For example, after a fresh reinstall:
Of note:
curl 'https://static.rust-lang.org/dist/2024-11-28/rustc-1.83.0-x86_64-unknown-linux-gnu.tar.xz'
succeeds and downloads the entire 69.3MiB, so this is a Rustup issue, not a network oneSteps
rustup default stable
Possible Solution(s)
Spitballing:
Range
requests to download the rest of the fileThough I didn't see any retries happening, so whatever the underlying error is, Rustup thinks it's permanent.
Notes
I got rustup working using my fileserver (mostly since i already had it lying around) and this mildly cursed setup across two terminals:
Not sure what the difference would be but I do know I built httpserv to be the minimum viable HTTP server, so it ignores a lot of potential complicating factors like
Connection
orRange
headers.Rustup version
rustup 1.27.1 (2024-05-07)
Installed toolchains
OS version
Arch Linux, updated today (2024-12-29)
The text was updated successfully, but these errors were encountered: