Open toteto opened 1 year ago
Only thing that has worked so far is changing the port number on each test run. If the test run uses port number that is previous used, it will fail with the above error.
Only thing that has worked so far is changing the port number on each test run. If the test run uses port number that is previous used, it will fail with the above error. @toteto every running task should use different port, for each default config it will get port by nextPort:
static async defaultConfig(): Promise<Config> {
const port = await SandboxServer.nextPort();
return {
...this.clientConfig,
homeDir: SandboxServer.randomHomeDir(),
port,
rm: false,
refDir: null,
rpcAddr: `http://localhost:${port}`,
};
}
https://github.com/near/workspaces-js/blob/main/packages/js/src/worker.ts#L108C7-L108C7 I think you just need to init worker without params:
const worker = await Worker.init();
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
My environment:
What I have tried
alice.test.near
even though not fully created.createAccount(...)
availableBalance()
)