Skip to content

Unable to fetch dependencies with stable-x86_64-pc-windows-gnu #9913

@AaronErhardt

Description

@AaronErhardt

cargo update and everything else works fine if I'm using the stable-x86_64-pc-windows-msvc toolchain. However, if I'm using stable-x86_64-pc-windows-gnu, Rust suddenly can't fetch dependencies. (Because this issue depends on the toolchain, I assume it's not a problem with cargo).

Output of cargo update

    Updating crates.io index
warning: spurious network error (2 tries remaining): failed to open request: Das Handle ist ungültig.
; class=Os (2)
warning: spurious network error (1 tries remaining): failed to open request: Das Handle ist ungültig.
; class=Os (2)
error: failed to get `gtk4` as a dependency of package `relm4-components v0.1.0 (C:\Users\ERHAAAR\git\relm4\relm4-components)`

Caused by:
  failed to load source for dependency `gtk4`

Caused by:
  Unable to update registry `crates-io`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to open request: Das Handle ist ungültig.
  ; class=Os (2)

"Das Handle ist ungültig" is German for "the handle is invalid".

Meta

rustc --version --verbose:

rustc 1.55.0 (c8dfcfe04 2021-09-06)
binary: rustc
commit-hash: c8dfcfe046a7680554bf4eb612bad840e7631c4b
commit-date: 2021-09-06
host: x86_64-pc-windows-msvc
release: 1.55.0
LLVM version: 12.0.1

and

rustc 1.55.0 (c8dfcfe04 2021-09-06)
binary: rustc
commit-hash: c8dfcfe046a7680554bf4eb612bad840e7631c4b
commit-date: 2021-09-06
host: x86_64-pc-windows-gnu
release: 1.55.0
LLVM version: 12.0.1
Shell log

path\to\project(main)> rustup default stable-x86_64-pc-windows-msvc
info: using existing install for 'stable-x86_64-pc-windows-msvc'
info: default toolchain set to 'stable-x86_64-pc-windows-msvc'

  stable-x86_64-pc-windows-msvc unchanged - rustc 1.55.0 (c8dfcfe04 2021-09-06)


path\to\project(main)> cargo update
    Updating crates.io index
    Updating serde_json v1.0.67 -> v1.0.68

path\to\project(main)> rustup default stable-x86_64-pc-windows-gnu
info: using existing install for 'stable-x86_64-pc-windows-gnu'
info: default toolchain set to 'stable-x86_64-pc-windows-gnu'

  stable-x86_64-pc-windows-gnu unchanged - rustc 1.55.0 (c8dfcfe04 2021-09-06)


path\to\project(main)> cargo update
    Updating crates.io index
warning: spurious network error (2 tries remaining): failed to open request: Das Handle ist ungültig.
; class=Os (2)
warning: spurious network error (1 tries remaining): failed to open request: Das Handle ist ungültig.
; class=Os (2)
error: failed to get `gtk4` as a dependency of package `relm4-components v0.1.0 (C:\Users\ERHAAAR\git\relm4\relm4-components)`

Caused by:
  failed to load source for dependency `gtk4`

Caused by:
  Unable to update registry `crates-io`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to open request: Das Handle ist ungültig.
  ; class=Os (2)
path\to\project(main)>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitO-windowsOS: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions