Content-Length: 233802 | pFad | http://github.com/iotaledger/identity.rs/issues/1525

C3 [Bug] WASM example `1_advanced/4_custom_resolution.ts` not compatible with NodeJs 22 · Issue #1525 · iotaledger/identity.rs · GitHub
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

[Bug] WASM example 1_advanced/4_custom_resolution.ts not compatible with NodeJs 22 #1525

Open
wulfraem opened this issue Feb 12, 2025 · 1 comment
Assignees
Labels
Bug Something isn't working. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog

Comments

@wulfraem
Copy link
Contributor

wulfraem commented Feb 12, 2025

Bug description

WASM example 1_advanced/4_custom_resolution.ts not compatible with NodeJs 22, but works fine with NodeJs 20.

Language version

  • Rust rustc 1.84.0 (9fc6b4312 2025-01-07)
  • NodeJs 22 and 20 (see below)

IOTA Identity version

  • v1.5.0 / current main branch

Steps To reproduce the bug

  1. Use Node 22
  2. Run the example, e.g. with npm run build:nodejs && npm run example:node -- 4_custom_resolution
  3. Should run into an error

Trying the same with Node 20 works just fine.

Expected behaviour

Example should be starting.

Actual behaviour

We're getting an error, as long as the import is used, e.g. with:

// (other imports)

import * as ed25519 from "@transmute/did-key-ed25519";

export async function customResolution() {
    // Set up a handler for resolving Ed25519 did:key
    const keyHandler = async function(didKey: string): Promise<CoreDocument> {
        const foobar = ed25519;
        return null as any;
    };

    // rest can be omitted
}

Errors

> ts-node --project tsconfig.node.json -r tsconfig-paths/register ./examples/src/main.ts 4_custom_resolution


  #  node[88297]: void node::fs::InternalModuleStat(const FunctionCallbackInfo<v8::Value> &) at ../src/node_file.cc:1039
  #  Assertion failed: (args.Length()) >= (2)

----- Native stack trace -----

 1: 0x100ddcd1c node::Assert(node::AssertionInfo const&) [/Users/example/.local/share/nvm/v22.13.0/bin/node]
 2: 0x102a0a3a4 node::fs::InternalModuleStat(v8::FunctionCallbackInfo<v8::Value> const&) (.cold.3) [/Users/example/.local/share/nvm/v22.13.0/bin/node]
 3: 0x100df0c94 node::fs::InternalModuleStat(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/example/.local/share/nvm/v22.13.0/bin/node]
 4: 0x1019baf98 Builtins_CallApiCallbackGeneric [/Users/example/.local/share/nvm/v22.13.0/bin/node]
 5: 0x1019b8ef0 Builtins_InterpreterEntryTrampoline [/Users/example/.local/share/nvm/v22.13.0/bin/node]
 6: 0x1019b8ef0 Builtins_InterpreterEntryTrampoline [/Users/example/.local/share/nvm/v22.13.0/bin/node]
 7: 0x1019b8ef0 Builtins_InterpreterEntryTrampoline [/Users/example/.local/share/nvm/v22.13.0/bin/node]
 8: 0x1019b8ef0 Builtins_InterpreterEntryTrampoline [/Users/example/.local/share/nvm/v22.13.0/bin/node]
 9: 0x1019b8ef0 Builtins_InterpreterEntryTrampoline [/Users/example/.local/share/nvm/v22.13.0/bin/node]

(...)

----- JavaScript stack trace -----

1: /Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:34535
2: /Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:34176
3: /Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:34506
4: /Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:173374
5: /Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:173420
6: /Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:173521
7: /Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:258942
8: /Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:261569
9: e (/Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:262673)
10: get (/Users/example/projects/iota/identity.rs-wasm-1/bindings/wasm/identity_wasm/node_modules/esm/esm.js:1:262740)
@wulfraem wulfraem added Bug Something isn't working. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog labels Feb 12, 2025
@eike-hass eike-hass moved this from Product Backlog to In Progress in IOTA Trust Framework Developments Feb 13, 2025
@eike-hass
Copy link
Collaborator

tracked here in the did-key-ed25519 repo

@eike-hass eike-hass moved this from In Progress to In Review in IOTA Trust Framework Developments Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog
Projects
Status: In Review
Development

No branches or pull requests

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/iotaledger/identity.rs/issues/1525

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy