Skip to content

Can not sign transactions for account test.near on network sandbox, no matching key pair found in InMemorySigner #211

Open
@antonio-ivanovski

Description

I am having issue while using the library. Uppon invoking rootAccount.createAccount(...) (or any of the other create account methods) I get error of: Can not sign transactions for account test.near on network sandbox, no matching key pair found in InMemorySigner(UnencryptedFileSystemKeyStore(/private/var/folders/_3/ggprgl2s3dg02ll3pgymf2280000gn/T/sandbox/81264186-ccb1-4f88-80c7-b932a3b1a62b))

This is the code snippet producing this

const nearRpcUrl = `http://127.0.0.1:${port}`;
const worker = await Worker.init({
// config needed until https://github.com/near/workspaces-js/pull/200 merged
port,
rpcAddr: nearRpcUrl,
});

console.log('accountId', worker.rootAccount.accountId); //  accountId test.near
console.log('availableBalance', await worker.rootAccount.availableBalance()); // availableBalance <BN: 314dc5f1d5bbc198ca396ebf3800>
console.log('exists', await worker.rootAccount.exists()); //  exists true

await worker.rootAccount.createAccount('alice'); // throws

My environment:

  • MacOs 13.3.1 (22E261)
  • Node v18.16.0
  • workspace-js v3.3.0

What I have tried

  • Changing the directory of where the sandbox directory
  • Validating in the sandbox directory that indeed has the private/public key. Yes, they are there. Even for alice.test.near even though not fully created.
  • Try with Node v16
  • Wait 10 seconds after init of worker , before trying createAccount(...)
  • Try without the config (it never goes past availableBalance())
  • Tested on `simple-project' example, fails again.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status

      NEW❗

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions