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

Error fetching example contracts from soroban-examples repo message pop up every single time I use soroban cli #1229

Closed
tenuki opened this issue Feb 29, 2024 · 1 comment · Fixed by #1232
Assignees
Labels
bug Something isn't working

Comments

@tenuki
Copy link

tenuki commented Feb 29, 2024

Error fetching example contracts from soroban-examples repo message pop up every single time I use soroban cli

What version are you using?

user@david-pc18:/tmp$ soroban --version
Error fetching example contracts from soroban-examples repo
Error fetching example contracts from soroban-examples repo
soroban 20.3.1 (ae5446f63ca8a275e61912019199254d598f3bd5)
soroban-env 20.2.1 (18a10592853d9edf4e341b565b0b1638f95f0393)
soroban-env interface version 85899345920
stellar-xdr 20.1.0 (8b9d623ef40423a8462442b86997155f2c04d3a1)
xdr curr (b96148cd4acc372cc9af17b909ffe4b12c43ecb6)

What did you do?

Installed soroban-cli following webpage instructions.

What did you expect to see?

A simple output message:

user@david-pc18:/tmp$ soroban --version
soroban 20.3.1 (ae5446f63ca8a275e61912019199254d598f3bd5)
soroban-env 20.2.1 (18a10592853d9edf4e341b565b0b1638f95f0393)
soroban-env interface version 85899345920
stellar-xdr 20.1.0 (8b9d623ef40423a8462442b86997155f2c04d3a1)
xdr curr (b96148cd4acc372cc9af17b909ffe4b12c43ecb6)

What did you see instead?

A messy output message with error I originally don't know why happens. Like this:

user@david-pc18:/tmp$ soroban --version
Error fetching example contracts from soroban-examples repo
Error fetching example contracts from soroban-examples repo
soroban 20.3.1 (ae5446f63ca8a275e61912019199254d598f3bd5)
soroban-env 20.2.1 (18a10592853d9edf4e341b565b0b1638f95f0393)
soroban-env interface version 85899345920
stellar-xdr 20.1.0 (8b9d623ef40423a8462442b86997155f2c04d3a1)
xdr curr (b96148cd4acc372cc9af17b909ffe4b12c43ecb6)

Why does this happens?

Well, internally soroban-cli is fetching this webpage: https://api.github.com/repos/stellar/soroban-examples/git/trees/main?recursive=1, and I don't know why, but it seems I'm getting problems to fetch that page:

user@david-pc18:/tmp$ wget 'https://api.github.com/repos/stellar/soroban-examples/git/trees/main?recursive=1'
--2024-02-29 16:45:08--  https://api.github.com/repos/stellar/soroban-examples/git/trees/main?recursive=1
Resolving api.github.com (api.github.com)... 20.201.28.148
Connecting to api.github.com (api.github.com)|20.201.28.148|:443... connected.
HTTP request sent, awaiting response... 403 rate limit exceeded
2024-02-29 16:45:08 ERROR 403: rate limit exceeded.

And then I realize the problem arouse because I've made a long script using soroban-cli tool which is all the time fetching that page..

It seems to me a bad idea to fetch a page on every invocation. Also, I don't want to know how it feels the experience of using this being offline.. ( scenario? developing against a locally deployed node..).

Problem is here: ../.cargo/registry/src/index.crates.io-6f17d22bba15001f/soroban-cli-20.3.1/src/commands/contract/init.rs

@tenuki tenuki added the bug Something isn't working label Feb 29, 2024
@willemneal
Copy link
Member

Thanks for reporting this. We are working to move this check to compile time.

willemneal added a commit to AhaLabs/stellar-cli that referenced this issue Mar 1, 2024
@willemneal willemneal linked a pull request Mar 1, 2024 that will close this issue
willemneal added a commit that referenced this issue Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants