Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

[Bug]: Wasm bindgen incompatibility with Node 22 #2254

Description

@eike-hass

Issue description

API calls via the Wasm bindings fail in Node 22 environments (docker and local)

Node 21 (via node:21 image) works

Version

1.1.3

Expected behaviour

return JSON API response

Actual behaviour

return error

Can the issue reliably be reproduced?

Yes

Steps to reproduce the issue

Find instructions and code for reproduction in docker here:
https://github.com/eike-hass/iota-sdk/tree/bug/network-error-in-dockerized-node22/bindings/wasm/reproduction

Or use local Node 22 and run node index.js in reproduction folder

Errors

-> % docker run repro

node:internal/process/promises:389
      new UnhandledPromiseRejection(reason);
      ^

UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "{"type":"error","payload":{"type":"client","error":"node error: error decoding response body: expected value at line 1 column 1"}}".
    at throwUnhandledRejectionsMode (node:internal/process/promises:389:7)
    at processPromiseRejections (node:internal/process/promises:470:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32) {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v22.3.0

Duplicate declaration

  • I have searched the issues tracker this issue and there is none

Metadata

Metadata

Assignees

No one assigned

    Labels

    b-wasmBindings - WasmbugBug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Product Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions