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

encode_json_str_to_native_script produces "RuntimeError: unreachable" in NodeJs #185

Open
leo42 opened this issue Feb 16, 2023 · 0 comments

Comments

@leo42
Copy link

leo42 commented Feb 16, 2023

Package version: "^3.1.2",
Operating system: Windows 10
Node version is : v18.12.1

Example to reproduce :


const CardanoWasm  = require("@dcspark/cardano-multiplatform-lib-nodejs");

const script1 = {
  "type": "all",
  "scripts":
  [
    {
      "type": "sig",
      "keyHash": "487b9485cf18d99e875e7aef9b80c4d3a89cccddefbc2641c87da293"
    },
    {
      "type": "sig",
      "keyHash": "7190ae1c26a87ed572e8d72049454ddc874d360293c1eb43aef490e3"
    },
  ]
} 


  try {
    let nativeScript = CardanoWasm.encode_json_str_to_native_script(
      script1,
      "",
      CardanoWasm.ScriptSchema.Node
      );
  } catch (err) {
    console.error("Error encoding JSON to native script:", err);
  }

Full error message :

Error encoding JSON to native script: RuntimeError: unreachable
at wasm://wasm/00799942:wasm-function[2770]:0x162893
at wasm://wasm/00799942:wasm-function[3850]:0x18e4df
at wasm://wasm/00799942:wasm-function[5579]:0x1b9e43
at wasm://wasm/00799942:wasm-function[5598]:0x1ba268
at wasm://wasm/00799942:wasm-function[5411]:0x1b7603
at wasm://wasm/00799942:wasm-function[220]:0x801cd
at wasm://wasm/00799942:wasm-function[1220]:0x108562
at module.exports.encode_json_str_to_native_script (C:\Users\leant\node_modules@dcspark\cardano-multiplatform-lib-nodejs\cardano_multiplatform_lib.js:273:14)
at Object. (C:\Users\leant\Desktop\tmp\test.js:20:36)
at Module._compile (node:internal/modules/cjs/loader:1159:14)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant