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

[Task] Investigate Wasm bindgen incompatibility with dockerized Node 22 #1384

Open
9 tasks
eike-hass opened this issue Jun 19, 2024 · 1 comment
Open
9 tasks

Comments

@eike-hass
Copy link
Collaborator

eike-hass commented Jun 19, 2024

Description

When running resolution through the Wasm bindings in dockerized Node 22 environment, the networks call fail.
Dockerized node 21 works, as well as Node 22 locally.

Motivation

Describe the motivation for the feature to be developed.

Resources

  • stacktrace
/usr/src/app/node_modules/@iota/identity-wasm/node/identity_wasm.js:14597
    const ret = new Error(getStringFromWasm0(arg0, arg1));
                ^

Error [JsError]: JavaScript function threw an exception: JsValue("{"type":"error","payload":{"type":"client","error":"node error: error decoding response body: expected value at line 1 column 1"}}"). 
    at module.exports.__wbg_new_28c511d9baebfa89 (/usr/src/app/node_modules/@iota/identity-wasm/node/identity_wasm.js:14597:17)
    at wasm://wasm/00e1eb76:wasm-function[5708]:0x2b0721
    at wasm://wasm/00e1eb76:wasm-function[3363]:0x25b5bd
    at wasm://wasm/00e1eb76:wasm-function[3483]:0x2669f4
    at wasm://wasm/00e1eb76:wasm-function[344]:0xc6144
    at wasm://wasm/00e1eb76:wasm-function[1015]:0x145445
    at wasm://wasm/00e1eb76:wasm-function[4861]:0x29f9c3
    at __wbg_adapter_32 (/usr/src/app/node_modules/@iota/identity-wasm/node/identity_wasm.js:225:10)
    at real (/usr/src/app/node_modules/@iota/identity-wasm/node/identity_wasm.js:210:20)
    at node:internal/process/task_queues:140:7

Node.js v22.3.0
  • maybe unrelated, maybe not, but on macOS (14.5, M1) there were errors when running the resolve example (npm run example:node -- 2_resolve_did) with v22. Building succeeded on v21 v22, running only worked on v21. On v22 the error below was shown:

image

  • as the lock file is checked in, an idea could be to bump our dependencies, e.g. @digitalbazaar/http-client from the screenshot is locked to 1.2.0, while current version is 4.1.1. So maybe we could bump that dependency or the dependency, that leads to it a bit; dependency path:
$ npm why @digitalbazaar/http-client
@digitalbazaar/[email protected] dev
node_modules/@digitalbazaar/http-client
  @digitalbazaar/http-client@"^1.1.0" from [email protected]
  node_modules/jsonld
    jsonld@"^5.2.0" from [email protected]
    node_modules/jsonld-checker
      jsonld-checker@"^0.1.6" from @did-core/[email protected]
      node_modules/@did-core/did-ld-json
        @did-core/did-ld-json@"^0.1.1-unstable.13" from @transmute/[email protected]
        node_modules/@transmute/did-key-common
          @transmute/did-key-common@"^0.3.0-unstable.9" from @transmute/[email protected]
          node_modules/@transmute/did-key-ed25519
            dev @transmute/did-key-ed25519@"0.3.0-unstable.9" from the root project

To-do list

Create a task-specific to-do list. Please link PRs that match the TODO list item behind the item after it has been submitted.

  • Item one
  • Item two
  • Item three

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • The feature or fix is implemented in Rust and across all bindings whereas possible.
  • The feature or fix has sufficient testing coverage
  • All tests and examples build and run locally as expected
  • Every piece of code has been document according to the documentation guidelines.
  • If conceptual documentation (mdbook) and examples highlighting the feature exist, they are properly updated.
  • If the feature is not currently documented, a documentation task Issue has been opened to address this.
@eike-hass
Copy link
Collaborator Author

Likely ultimately caused by iotaledger/iota-sdk#2254

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

No branches or pull requests

1 participant