Skip to content
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

failed to fetch https://github.com/rust-lang/crates.io-index #2

Closed
taitruong opened this issue Jul 3, 2022 · 5 comments
Closed

Comments

@taitruong
Copy link

I followed README and changed config.terrain.json:

    "instantiateMsg": {
     "name":"Cryptocurrency Token NFTs",
     "symbol":"TOKENS",
     "minter":"terra1x46rqay4d3cssq8gxxvqz8xt6nwlz4td20k38v"
   }

Then when I deploy I get this:
$ terrain deploy cw721-metadata-onchain --signer test1
using pre-baked 'test1' wallet on localterra as signer
Updating crates.io index
Downloaded serde_derive v1.0.138
Downloaded serde v1.0.138
Downloaded 2 crates (131.1 KB) in 0.32s
Compiling proc-macro2 v1.0.40
Compiling quote v1.0.20
...
Finished release [optimized] target(s) in 27.30s
Info: RUSTC_WRAPPER=sccache
Info: sccache stats before build
Compile requests 0
Compile requests executed 0
Cache hits 0
Cache misses 0
Cache timeouts 0
Cache read errors 0
Forced recaches 0
Cache write errors 0
Compilation failures 0
Cache errors 0
Non-cacheable compilations 0
Non-cacheable calls 0
Non-compilation calls 0
Unsupported compiler calls 0
Average cache write 0.000 s
Average cache read miss 0.000 s
Average cache read hit 0.000 s
Failed distributed compilations 0
Cache location Local disk: "/root/.cache/sccache"
Cache size 0 bytes
Max cache size 10 GiB
Building contract in /code ...
Updating crates.io index
warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Try again; class=Net (12)
warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Try again; class=Net (12)
error: failed to get serde as a dependency of package cw721-metadata-onchain v0.13.2 (/code)

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

Caused by:
network failure seems to have happened
if a proxy or similar is necessary net.git-fetch-with-cli may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
failed to resolve address for github.com: Try again; class=Net (12)
Error: Command failed: docker run --rm -v "$(pwd)":/code --mount
type=volume,source="$(basename "$(pwd)")_cache",target=/code/target --mount
type=volume,source=registry_cache,target=/usr/local/cargo/registry
cosmwasm/rust-optimizer:0.12.5

@taitruong
Copy link
Author

Minter address is what I got from test1 wallet on localterra.

@terran6
Copy link
Owner

terran6 commented Jul 4, 2022

Hey @taitruong.

Might you be using a Windows computer? You can try the following thread to look for solutions. I have linked you to the answer which I thought may be most promising for you, but you may look through the others if it does not solve your problem. The post details an issue similar to what you are experiencing so I thought you could give it a try.

rust-lang/cargo#6513 (comment)

@taitruong
Copy link
Author

Hey @taitruong.

Might you be using a Windows computer? You can try the following thread to look for solutions. I have linked you to the answer which I thought may be most promising for you, but you may look through the others if it does not solve your problem. The post details an issue similar to what you are experiencing so I thought you could give it a try.

rust-lang/cargo#6513 (comment)

Same error. I have created config file ~/.cargo/config.toml with:

[net]
git-fetch-with-cli = true

Same error pops up as shown above. Interestingly this problem occurs when it tries to get serde package. Looking into .cargo folder I see the serde package has been downloaded:

$ ls -al github.com-1ecc6299db9ec823/se*
-rw-rw-r-- 1 ttruong ttruong 17727 Jul 4 15:17 github.com-1ecc6299db9ec823/sec1-0.2.1.crate
-rw-rw-r-- 1 ttruong ttruong 76271 Jul 4 15:17 github.com-1ecc6299db9ec823/serde-1.0.138.crate
-rw-rw-r-- 1 ttruong ttruong 54841 Jul 4 15:17 github.com-1ecc6299db9ec823/serde_derive-1.0.138.crate
-rw-rw-r-- 1 ttruong ttruong 25382 Jul 4 15:17 github.com-1ecc6299db9ec823/serde_derive_internals-0.26.0.crate
-rw-rw-r-- 1 ttruong ttruong 144514 Jul 4 15:17 github.com-1ecc6299db9ec823/serde_json-1.0.82.crate
-rw-rw-r-- 1 ttruong ttruong 25699 Jul 4 15:17 github.com-1ecc6299db9ec823/serde-json-wasm-0.4.1.crate

As you can see I have updated serde version to 1.0.138 in Cargo.toml - but same error.

My environment is as follows:

OS: Ubuntu 20.03
rustc: 1.62.0
cargo: 1.62.0
terrain: @terra-money/terrain/0.4.1 linux-x64 node-v16.13.2

@terran6
Copy link
Owner

terran6 commented Jul 5, 2022

@taitruong

Two things that I would try:
Try to update the version of Docker you are using to the latest version if it is not already.
Ensure that you have properly setup Rust as per the Terrain documentation:
https://github.com/terra-money/terrain#setup-rust

Let's see if either of those have any affect.

@taitruong
Copy link
Author

I've updated repo and now it works like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants