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 when running with testnet #214

Open
dino-bear opened this issue Oct 7, 2022 · 3 comments
Open

Error when running with testnet #214

dino-bear opened this issue Oct 7, 2022 · 3 comments

Comments

@dino-bear
Copy link

All my tests were working fine until they suddenly stopped working on testnet. They still run perfectly when using the sandbox, but when I switch to testnet it throws the following error.

Error: Failed to query access key: error while parsing method call result: [data did not match any variant of untagged enum QueryResponseKind]
thread 'test_methods_cost' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/test/src/lib.rs:184:5

I tried cleaning cargo but no luck

@ChaoticTempest
Copy link
Member

[data did not match any variant of untagged enum QueryResponseKind] usually happens when the client libraries are out of sync with the types associated to on testnet. Which version of workspaces-rs are you using? It could be out of date, and recommended to upgrade to the latest if you haven't already.

@dino-bear
Copy link
Author

Thanks for the answer, I'm using workspaces = "0.6.0"

I just run the tests again after some hours, and it surprisingly worked without touching anything. Is there like a rate limit on how many times you can call dev_deploy and dev_create_account with testnet? maybe that was the issue

@ChaoticTempest
Copy link
Member

Is there like a rate limit on how many times you can call dev_deploy and dev_create_account with testnet? maybe that was the issue

There is (in a sense). The Helper contract is what is creating all these dev accounts for testnet, and it funds them with Testnet tokens. There's a set limit to how many dev accounts we can create due to the limited supply of testnet tokens. If the account gets drained, then we're not able to create accounts. [data did not match any variant of untagged enum QueryResponseKind] shouldn't have been the error you should've seen from this. I wonder if the helper contract/url is returning the proper errors here.

There's an issue added to help alleviate the draining of account funds here: #215

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

No branches or pull requests

2 participants