iotaledger / iotaledger/identity
[Task] Investigate Wasm bindgen incompatibility with dockerized Node 22
- Dominant language
- Rust
- Stars
- 346
- Forks
- 100
- Avg merge
- 13h 41m
- Merged PRs (30d)
- 2
Description
## 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:

- 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:
```raw
$ npm why @digitalbazaar/http-client
@digitalbazaar/http-client@1.2.0 dev
node_modules/@digitalbazaar/http-client
@digitalbazaar/http-client@"^1.1.0" from jsonld@5.2.0
node_modules/jsonld
jsonld@"^5.2.0" from jsonld-checker@0.1.8
node_modules/jsonld-checker
jsonld-checker@"^0.1.6" from @did-core/did-ld-json@0.1.1-unstable.15
node_modules/@did-core/did-ld-json
@did-core/did-ld-json@"^0.1.1-unstable.13" from @transmute/did-key-common@0.3.0-unstable.10
node_modules/@transmute/did-key-common
@transmute/did-key-common@"^0.3.0-unstable.9" from @transmute/did-key-ed25519@0.3.0-unstable.9
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.
Contributor guide
Assessment
This issue has not been assessed yet.