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

Problems due to account validation cache #61

Open
artob opened this issue Dec 1, 2020 · 1 comment
Open

Problems due to account validation cache #61

artob opened this issue Dec 1, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@artob
Copy link
Contributor

artob commented Dec 1, 2020

The __CREATE_ACCOUNT_VALIDATION_CACHE feature has been causing me trouble in trying to run the Balancer tests (near/nearcore#3665):

Screen Shot 2020-12-01 at 17 17 54

(That's with neard built from nearcore's evm-precompile branch, naturally.)

The trouble originates from these lines in src/utils.js:

https://github.com/near/near-web3-provider/blob/fc8f96491fd7aa35a186d5119e5659fe8cefe74f/src/utils.js#L340-L350

Logging the swallowed error in the aforementioned catch clause gives this:

TypedError: [-32000] Server error: account 1606505330670.test.near does not exist while viewing
    at JsonRpcProvider.sendJsonRpc (/home/arto/Sources/near-web3-provider.101/node_modules/near-api-js/lib/providers/json-rpc-provider.js:157:27)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at JsonRpcProvider.query (/home/arto/Sources/near-web3-provider.101/node_modules/near-api-js/lib/providers/json-rpc-provider.js:65:24)
    at Account.fetchState (/home/arto/Sources/near-web3-provider.101/node_modules/near-api-js/lib/account.js:49:23)
    at _createTestAccount (/home/arto/Sources/near-web3-provider.101/src/utils.js:345:17) {
  type: 'UntypedError',
  context: undefined
}

For now, I've worked around the problem by simply commenting out the lines in question.

Have you encountered this issue, @mikedotexe?

@artob artob added the bug Something isn't working label Dec 1, 2020
@mikedotexe
Copy link
Contributor

You may want to try removing the files like this:

pwd=$(pwd)
echo "Attempting to remove old local accounts from $pwd/neardev/local"
rm -f $pwd/neardev/local/16*
echo "Attempting to remove old local accounts from ~/.near-credentials/local"
rm -f ~/.near-credentials/local/*.json

But that is not a good long term solution, just to get over this hump so we can both see the same tests failing/passing

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

No branches or pull requests

2 participants