Unable to get Piston dependency

After adding this in the dependency for cargo.toml file
piston_window = "*"

and I ran this in the console cargo build I get this error.

    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading piston_window v0.105.0
error: unable to get packages from source

Caused by:
  [35] SSL connect error (schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - The revocation function was unable to check revocation because the revocation server was offline.)

Is the Piston game engine dead?

According to this issue, it should go away momentarily.

1 Like

I am running it now same problem, why is this happening?

Some server related to your connection is down.

Its been happening to any dependency that I attempt to download, why is this happening, I don't have a proxy setup or firewall on my PC?

The error isn't your fault: Someone has a server that cargo uses to verify the security of your connection, but that server was down. It will likely disappear on its own later.

You can try to disable the security check: SSL connect error · Issue #7096 · rust-lang/cargo · GitHub

Thanks for the report! This is a transient error that sometimes shows up on Windows. You can set http.check-revoke = false in config (or CARGO_HTTP_CHECK_REVOKE=false in env) to ignore the error as well.

Which config file or env file is this person referring to?

I assume you're on windows? I'm not too familiar with windows, but I think you can set the environment variable by just running the command:

SET CARGO_HTTP_CHECK_REVOKE=false

before running cargo.

image

Hi, which variable should I add SET CARGO_HTTP_CHECK_REVOKE=false this line to?

Did you check if you still have the problem? The server may not still be down.

That said, I would recommend setting it temporarily by running the SET command in your console before running the cargo command. This way you don't disable the security features forever.

If you do want to set the property permanently, it should go in system variables together with Path, and the name should be CARGO_HTTP_CHECK_REVOKE while the value should be false.

Its still happening for me :frowning:
It has been happening a month back when I tried to install some other dependency.

image

I added this to the system's variable under Path. and I still get the same issue, do you know what is causing this?

Yes. You set the name to be "SET CARGO_HTTP_CHECK_REVOKE=false", but the name should just be CARGO_HTTP_CHECK_REVOKE.

Oh I see, but then how do I get it to set it to false then?

I tried just adding this CARGO_HTTP_CHECK_REVOKE but that didn't work still

When you set it there should be some other field in the dialog where you can put the value. I don't use windows myself, so I can't give a screenshot. Try looking up how to change path, since it should be the same process.

Note that you will likely have to restart the terminal you ran the command from to make it notice the change. You may even need to log out and back in. Again, I don't know the exact details.

There is literally no other field to put additional information in.
image

All good.

I have rebooted my entire PC. Issues are still the same.

SET CARGO_HTTP_CHECK_REVOKE=false I ran this command on cmd with no errors, but same problem when I run cargo build, same issue.

I have tried to do this on GNU/Linux on my VM and it works perfectly fine so it is not a server issue at all, I don't know why on Windows I am having such issues.

Ok so I went to the %userprofile%\.cargo directory and I added a file inside that directory called config. Inside that file I have added these lines.

[http]
check-revoke = false

So now when I run cargo build it seems to be now connecting but then I get this new error.

Downloading piston_window v0.105.0
 Downloading gfx_device_gl v0.16.2
 Downloading pistoncore-glutin_window v0.63.0
 Downloading shader_version v0.6.0
 Downloading piston2d-graphics v0.35.0
 Downloading piston2d-gfx_graphics v0.66.0
 Downloading piston v0.49.0
 Downloading gfx v0.18.2
 Downloading piston-texture v0.8.0
 Downloading log v0.4.8
 Downloading gfx_gl v0.6.0
 Downloading gfx_core v0.9.2
 Downloading cfg-if v0.1.10
error: unable to get packages from source

Caused by:
  failed to parse manifest at `C:\Users\Joe\.cargo\registry\src\github.com-1ecc6299db9ec823\cfg-if-0.1.10\Cargo.toml`

Caused by:
  editions are unstable

Caused by:
  feature `edition` is required

this Cargo does not support nightly features, but if you
switch to nightly channel you can add
`cargo-features = ["edition"]` to enable this feature

I don't want to switch to cargo nightly. Is there another way around this situation?

What version of Cargo are you using? Looks like it's fairly old.

1 Like

I am using cargo 1.27.0 (1e95190e5 2018-05-27)

Is there a new version, how do I update cargo?

It depends on how you originally installed it. If you used rustup, you can use the command rustup update

2 Likes

By the way, it's entirely possible the you can revert the config changes after update. If this is really the case, I'd try to bisect the problem (i.e. find the first version that works) and check if there is an issue on Rust repo, but if you don't want to do this, the check should be enabled when possible.

1 Like