Skip to content

HTTP 400 Bad Request on macOS 13 when using cargo install #389

@delan

Description

@delan
$ uname -a
Darwin servos-iMac-Pro 22.6.0 Darwin Kernel Version 22.6.0: Thu Apr 24 20:25:14 PDT 2025; root:xnu-8796.141.3.712.2~1/RELEASE_X86_64 x86_64
$ rustup --version
rustup 1.28.1 (f9edccde0 2025-03-05)
$ rustc --version
rustc 1.88.0 (6b00bc388 2025-06-23)
$ cargo --version
cargo 1.88.0 (873a06493 2025-05-10)

on macOS 13, nightly tarballs fail to download when following the instructions on the Installation page:

$ git clone https://github.com/rust-lang/rust.git ~/rust
$ RUST_SRC_REPO=$HOME/rust cargo install cargo-bisect-rustc
$ cargo new foo
    Creating binary (application) `foo` package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
$ cd foo
$ cargo bisect-rustc --access=checkout --start=1.85.0 --end=1.86.0
opening existing repository at "/Users/servo/rust"
Found origin remote under name `origin`
refreshing repository at "/Users/servo/rust"
translating --start=1.85.0 to 2025-01-03
opening existing repository at "/Users/servo/rust"
Found origin remote under name `origin`
refreshing repository at "/Users/servo/rust"
translating --end=1.86.0 to 2025-02-15
checking the start range to find a passing nightly
installing nightly-2025-01-03
uninstalling nightly-2025-01-03
ERROR: Could not download toolchain: A reqwest error occurred: HTTP status client error (400 Bad Request) for url (https://static.rust-lang.org/dist/2025-01-03/rustc-nightly-x86_64-apple-darwin.tar.xz)

Caused by:
    0: A reqwest error occurred: HTTP status client error (400 Bad Request) for url (https://static.rust-lang.org/dist/2025-01-03/rustc-nightly-x86_64-apple-darwin.tar.xz)
    1: HTTP status client error (400 Bad Request) for url (https://static.rust-lang.org/dist/2025-01-03/rustc-nightly-x86_64-apple-darwin.tar.xz)

the same failure happens even if we use cargo install --locked to respect Cargo.lock. but if we use cargo install --locked --debug to switch from release build to debug build, it works:

$ cargo uninstall cargo-bisect-rustc
$ RUST_SRC_REPO=$HOME/rust cargo install --locked --debug cargo-bisect-rustc
$ cargo bisect-rustc --access=checkout --start=1.85.0 --end=1.86.0
opening existing repository at "/Users/servo/rust"
Found origin remote under name `origin`
refreshing repository at "/Users/servo/rust"
translating --start=1.85.0 to 2025-01-03
opening existing repository at "/Users/servo/rust"
Found origin remote under name `origin`
refreshing repository at "/Users/servo/rust"
translating --end=1.86.0 to 2025-02-15
checking the start range to find a passing nightly
installing nightly-2025-01-03
rust-std-nightly-x86_64-apple-darwin: 27.85 MB / 27.85 MB [=====================================================================================================================================================================================] 100.00 % 8.44 MB/s
testing...
RESULT: nightly-2025-01-03, ===> Successfully compiled
uninstalling nightly-2025-01-03

checking the end range to verify it does not pass
installing nightly-2025-02-15
testing...
RESULT: nightly-2025-02-15, ===> Successfully compiled
uninstalling nightly-2025-02-15

ERROR: the end of the range (nightly-2025-02-15) does not reproduce the regression

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions