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

incomprehensible error.. wbindgen #191

Open
nphias opened this issue Nov 6, 2023 · 4 comments
Open

incomprehensible error.. wbindgen #191

nphias opened this issue Nov 6, 2023 · 4 comments

Comments

@nphias
Copy link

nphias commented Nov 6, 2023

i assume this means some problem with the wasm build.. but better error handling and info is needed

mac os ventura
"dependencies": {
"@msgpack/msgpack": "^2.7.0",
"@holochain/client": "^0.16.2",
"@holochain/tryorama": "^0.15.1",
"js-base64": "3.7.5",
"typescript": "^4.9.4",
"vitest": "^0.28.4"
},

stderr | .test.ts > create and read zome
error occurred during test run: internal_error: Conductor returned an error while using a ConductorApi: RibosomeError(WasmRuntimeError(RuntimeError { source: User(WasmError { file: "crates/holochain/src/core/ribosome/real_ribosome.rs", line: 441, error: Compile("Error while importing "wbindgen_placeholder"."__wbindgen_describe": unknown import. Expected Function(FunctionType { params: [I32], results: [] })") }), wasm_trace: [], native_trace: 0:


<unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: <unknown>
  28: <unknown>
  29: <unknown>
  30: <unknown>
 }))
    at catchError (file:///Users/node_modules/@holochain/tryorama/node_modules/@holochain/client/lib/api/common.js:37:23)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at AdminWebsocket.installApp (file:///Users/node_modules/@holochain/tryorama/node_modules/@holochain/client/lib/api/common.js:13:22)
    at Scenario.addPlayerWithApp (file:///Users/node_modules/@holochain/tryorama/lib/local/scenario.js:61:25)
    at async Promise.all (index 1)
    at Scenario.addPlayersWithApps (file:///Users/node_modules/@holochain/tryorama/lib/local/scenario.js:77:25)
    at /Users/test.ts:20:26
    at Module.runScenario (file:///Users/node_modules/@holochain/tryorama/lib/local/scenario.js:131:9)
    at /Users/test.ts:10:3
    at runTest (file:///Users/node_modules/@vitest/runner/dist/index.js:439:9)

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 ❯ catchError ../node_modules/@holochain/tryorama/node_modules/@holochain/client/lib/api/common.js:37:23
 ❯ AdminWebsocket.installApp ../node_modules/@holochain/tryorama/node_modules/@holochain/client/lib/api/common.js:13:22
 ❯ Scenario.addPlayerWithApp ../node_modules/@holochain/tryorama/lib/local/scenario.js:61:25
 ❯ Scenario.addPlayersWithApps ../node_modules/@holochain/tryorama/lib/local/scenario.js:77:25
 ❯ src/my_space/schedule/appointment.test.ts:20:26
     18|     // Add 2 players with the test app to the Scenario. The returned players
     19|     // can be destructured.
     20|     const [alice, bob] = await scenario.addPlayersWithApps([appSource, appSource]);
       |                          ^
     21| 
     22|     // Shortcut peer discovery through gossip and register all agents in every
 ❯ Module.runScenario ../node_modules/@holochain/tryorama/lib/local/scenario.js:131:9


@nphias nphias changed the title incomprensible error.. wbindgen incomprehensible error.. wbindgen Nov 6, 2023
@jost-s
Copy link
Contributor

jost-s commented Nov 6, 2023

That's probably an incompatibility between Holochain and the HDK/HDI of the zomes. Please double check that they match. If that is the source of the error, I can't do anything about this uninformative error in tryorama, but we could look at it in Holochain.

@nphias
Copy link
Author

nphias commented Nov 6, 2023

i found that by adding the package
chrono = { version = "0.4" }
to my cargo.toml caused the error

i am using the package for timestamp conversions
when i did this .. i no longer get the error:
chrono = { version = "0.4" default-feature = false}
related to this bug:
holochain/holochain#1512

an error message that said ..: check your dependency crates are wasm compatible .. would have saved me a few hours

@jost-s
Copy link
Contributor

jost-s commented Nov 7, 2023

Right, yeah! I've seen that too but didn't remember.

@jost-s
Copy link
Contributor

jost-s commented Nov 22, 2023

I just ran into this again. On Discord it was said to pin chrono to 0.4.6 but that no longer works due to incompatibility with serde. So your solution works, disabling default features which excludes wasm-bindgen.

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

2 participants