Near: Querying [object Object] failed: wasm execution failed with error: FunctionCallError

241 views Asked by At

I'm trying to develop a project on near blockchain. After writing the smart contract, I wanted to perform integration tests on it. But it failed. So I created a new project with the default rust code and integration test code and tried to run it. But those tests are failing too. The following error is being shown

> [email protected] test
> ava


  ✖ returns the default greeting Rejected promise returned by test
  ✖ changes the message Rejected promise returned by test
  ─

  returns the default greeting

  Rejected promise returned by test. Reason:

  Error (TypedError) {
    context: undefined,
    type: 'UntypedError',
    message: `Querying [object Object] failed: wasm execution failed with error: FunctionCallError(CompilationError(WasmerCompileError { msg: "The target x86_64 without AVX is not yet supported (see https://docs.wasmer.io/ecosystem/wasmer/wasmer-features)" })).␊
    {␊
      "block_hash": "CrkcuTfUA4TegQGNkmXx7jKr52Yxg3DjD4JoaneySJf9",␊
      "block_height": 7,␊
      "error": "wasm execution failed with error: FunctionCallError(CompilationError(WasmerCompileError { msg: \\"The target x86_64 without AVX is not yet supported (see https://docs.wasmer.io/ecosystem/wasmer/wasmer-features)\\" }))",␊
      "logs": []␊
    }`,
  }

  › }
  › JsonRpcProvider.query (node_modules/near-api-js/lib/providers/json-rpc-provider.js:123:19)
  › async Account.view (node_modules/near-workspaces/src/account/account.ts:286:20)
  › async src/main.ava.ts:35:27



  changes the message

  Rejected promise returned by test. Reason:

  Error (TransactionError) {
    message: '{"result":{"receipts_outcome":[{"block_hash":"72ZMU6wLTcHjsYpVDSsAaxXVTNyDfA8t9dW4GYRK2URQ","id":"AvCkEqxrzduUwSjcvYxJxTT1bjWbgLJbrDCgBazgZKnD","outcome":{"executor_id":"test-account.test.near","gas_burnt":2427990313954,"logs":[],"metadata":{"gas_profile":[],"version":1},"receipt_ids":["2LxqXNZrZJUX7k3YCUBqpKvHu1LB3Poh3vwj8hLoPLxR"],"status":{"Failure":{"ActionError":{"index":0,"kind":{"FunctionCallError":{"CompilationError":{"WasmerCompileError":{"msg":"The target x86_64 without AVX is not yet supported (see https://docs.wasmer.io/ecosystem/wasmer/wasmer-features)"}}}}}}},"tokens_burnt":"242799031395400000000"},"proof":[]},{"block_hash":"6sgoNpFUfeVicve6VCXvJ7AirAe7RrQBT9rthgVvs13c","id":"2LxqXNZrZJUX7k3YCUBqpKvHu1LB3Poh3vwj8hLoPLxR","outcome":{"executor_id":"test.near","gas_burnt":223182562500,"logs":[],"metadata":{"gas_profile":[],"version":1},"receipt_ids":[],"status":{"SuccessValue":""},"tokens_burnt":"0"},"proof":[]}],"status":{"Failure":{"ActionError":{"index":0,"kind":{"FunctionCallError":{"CompilationError":{"WasmerCompileError":{"msg":"The target x86_64 without AVX is not yet supported (see https://docs.wasmer.io/ecosystem/wasmer/wasmer-features)"}}}}}}},"transaction":{"actions":[{"FunctionCall":{"args":"eyJtZXNzYWdlIjoiSG93ZHkifQ==","deposit":"0","gas":30000000000000,"method_name":"set_greeting"}}],"hash":"GPu9QUgbD5D7v4VobTgF5AYyYbUSi6VEepCfgvWZDYJQ","nonce":2,"public_key":"ed25519:C36WpSqZ6BQATn3xwGuyg746YmZn3Pe6sVagjxVZe1fm","receiver_id":"test-account.test.near","signature":"ed25519:4fW6XMk4QwGhjuHuQiVu3Rqj8zV6875WsuXz9onSociRSqNHdPYmuen4SGk6ZEDW2r2fDEkYXoWEVtHEiJx8zsea","signer_id":"test.near"},"transaction_outcome":{"block_hash":"5hkwvFN6NVRYaufU7TfJ9rPpoAUi3gVm49vfkLcHW6wE","id":"GPu9QUgbD5D7v4VobTgF5AYyYbUSi6VEepCfgvWZDYJQ","outcome":{"executor_id":"test.near","gas_burnt":2427990313954,"logs":[],"metadata":{"gas_profile":null,"version":1},"receipt_ids":["AvCkEqxrzduUwSjcvYxJxTT1bjWbgLJbrDCgBazgZKnD"],"status":{"SuccessReceiptId":"AvCkEqxrzduUwSjcvYxJxTT1bjWbgLJbrDCgBazgZKnD"},"tokens_burnt":"242799031395400000000"},"proof":[]}},"startMs":1665577075284,"endMs":1665577077813,"config":{"network":"sandbox","rootAccountId":"test.near","rpcAddr":"http://localhost:4919","initialBalance":"100000000000000000000000000","homeDir":"/tmp/sandbox/f1bdbd42-d92a-4220-99eb-904fa43126f7","port":4919,"rm":false,"refDir":null}}',
  }

  › Account.call (node_modules/near-workspaces/src/account/account.ts:275:13)
  › async src/main.ava.ts:41:3

  ─

  2 tests failed

Can someone please point out what the error might be. I have not even touched to code. I simply ran npx create-near-app followed by running npm run build and npm test.

0

There are 0 answers