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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] SDK fails to initialize in Deno #864

Open
hacklschorsch opened this issue Mar 1, 2024 · 0 comments
Open

[Bug] SDK fails to initialize in Deno #864

hacklschorsch opened this issue Mar 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hacklschorsch
Copy link

馃悰 Bug Report

I would like to use the Deno JS runtime but cannot - the Aleo SDK crashes during initialization.

Steps to Reproduce

  1. Run reproducer below in deno: deno run --allow-read --allow-env --allow-run deno-aleo-init-fail.js

Code snippet to reproduce

deno-aleo-init-fail.js:

import { Account, Program, ProgramManager } from '@aleohq/sdk'

console.log("Hello")

package.json:

{
  "name": "aleo-deno-reproducer",
  "dependencies": {
    "@aleohq/sdk": "^0.6.9"
  }
}

Stack trace & error message

error: Uncaught Error: Invalid port number string returned:
    at findPort ([redacted]/aleo-deno-reproducer/node_modules/.deno/sync-rpc@1.3.6/node_modules/sync-rpc/lib/index.js:70:11)
    at start ([redacted]/aleo-deno-reproducer/node_modules/.deno/sync-rpc@1.3.6/node_modules/sync-rpc/lib/index.js:32:16)
    at sendMessage ([redacted]/aleo-deno-reproducer/node_modules/.deno/sync-rpc@1.3.6/node_modules/sync-rpc/lib/index.js:133:17)
    at createClient ([redacted]/aleo-deno-reproducer/node_modules/.deno/sync-rpc@1.3.6/node_modules/sync-rpc/lib/index.js:173:27)
    at Object.<anonymous> ([redacted]/aleo-deno-reproducer/node_modules/.deno/sync-request@6.1.0/node_modules/sync-request/lib/index.js:16:14)
    at Object.<anonymous> ([redacted]/aleo-deno-reproducer/node_modules/.deno/sync-request@6.1.0/node_modules/sync-request/lib/index.js:36:4)
    at Module._compile (node:module:733:34)
    at Object.Module._extensions..js (node:module:747:10)
    at Module.load (node:module:658:32)
    at Function.Module._load (node:module:539:12)

Expected Behavior

The SDK should work the same as it does in Node.

Your Environment

  • Aleo SDK 0.6.9
  • Deno 1.38.2
  • NixOS 23.11
@hacklschorsch hacklschorsch added the bug Something isn't working label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant