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

KeyNotFound for test.near account #167

Open
valar999 opened this issue May 19, 2022 · 1 comment
Open

KeyNotFound for test.near account #167

valar999 opened this issue May 19, 2022 · 1 comment

Comments

@valar999
Copy link

valar999 commented May 19, 2022

Sometimes, in less than 5% of cases, this error appears.

Error (TypedError)

{ context: undefined, type: 'KeyNotFound', message: 'Can not sign transactions for account test.near on network sandbox, no matching key pair found in InMemorySigner(UnencryptedFileSystemKeyStore(/tmp/sandbox/8b20131f-f761-4c87-8976-470515b856f4)).', }

workspaces-js v2.0.0

My simplified code:

test.beforeEach(async (t) => {
 const worker = await Worker.init();
 const user = await worker.rootAccount.createAccount("user");
 });
@volovyks
Copy link
Collaborator

volovyks commented Aug 7, 2022

Most likely this is because the account was not actually created on-chain.
We need to throw errors early here: https://github.com/near/workspaces-js/blob/main/packages/js/src/account/account.ts#L208

@github-project-automation github-project-automation bot moved this to Backlog 🥶 in DevRel Jun 3, 2024
@thisisjoshford thisisjoshford removed this from DevRel Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants