iden3 / circomlib

Library of basic circuits for circom
623 stars 213 forks source link

Webassembly LinkError when running tests #103

Open samlaf opened 1 year ago

samlaf commented 1 year ago

Just cloned the repo, ran npm i, and mocha --grep "MiMC Circuit test" and getting

  MiMC Circuit test
    1) "before all" hook for "Should check constrain"

  0 passing (310ms)
  1 failing

  1) MiMC Circuit test
       "before all" hook for "Should check constrain":
     LinkError: WebAssembly.instantiate(): Import #1 module="runtime" function="printErrorMessage" error: function import requires a callable
      at builder (node_modules/circom_tester/wasm/witness_calculator.js:19:40)
      at async wasm_tester (node_modules/circom_tester/wasm/tester.js:60:16)
      at async Context.<anonymous> (test/mimccircuit.js:15:19)

Any idea what's happening? This is on a macbook pro m1.

jplaui commented 1 year ago

go to the package.json file and change the circom tester to the latest tag, like: "circom_tester": "0.0.19". For me this solved the issue...