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

crypto.getRandomValues is not a function #2574

Open
3 of 4 tasks
blockchain-develop opened this issue Oct 15, 2024 · 1 comment
Open
3 of 4 tasks

crypto.getRandomValues is not a function #2574

blockchain-develop opened this issue Oct 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@blockchain-develop
Copy link

Please confirm the following:

  • I have read the Code of Conduct
  • The bug was not reported before
  • I am using the latest version of the relevant package(s)

What operating system are you using? And what version?

mac

What environment or browser are you using? And what version?

node.js

What package is the bug report about?

@kadena/chainwebjs

Describe the bug

~ % kadena key generate
? Enter an alias for your key: aaa_01
? Enter the amount of keys you want to generate (alias-{amount} will increment) (default: 1): 1

An error occurred: crypto.getRandomValues is not a function

Is this a bug? Let us know:
https://github.com/kadena-community/kadena.js/issues/new?assignees=&labels=bug&projects=&template=001-bug_report.yml&os=darwin&browser=Node.JS%20v16.13.0&description=Describe%20the%20issue%3A%0A%0A%0AError%20stacktrace%3A%0ATypeError%3A%20crypto.getRandomValues%20is%20not%20a%20function%0A%20%20%20%20at%20randomBytes%20(file%3A%2F%2F%2FUsers%2Ftangaoyuan%2F.nvm%2Fversions%2Fnode%2Fv16.13.0%2Flib%2Fnode_modules%2F%40kadena%2Fkadena-cli%2Fnode_modules%2F%40kadena%2Fhd-wallet%2Flib%2Fesm%2Futils%2Fcrypto.js%3A7%3A45)%0A%20%20%20%20at%20kadenaKeyPairsFromRandom%20(file%3A%2F%2F%2FUsers%2Ftangaoyuan%2F.nvm%2Fversions%2Fnode%2Fv16.13.0%2Flib%2Fnode_modules%2F%40kadena%2Fkadena-cli%2Fnode_modules%2F%40kadena%2Fhd-wallet%2Flib%2Fesm%2FSLIP10%2FkadenaKeyPairsFromRandom.js%3A13%3A34)%0A%20%20%20%20at%20PlainKeyService.generateKeyPairs%20(file%3A%2F%2F%2FUsers%2Ftangaoyuan%2F.nvm%2Fversions%2Fnode%2Fv16.13.0%2Flib%2Fnode_modules%2F%40kadena%2Fkadena-cli%2Flib%2Fservices%2Fplain-key%2Fplainkey.service.js%3A53%3A16)%0A%20%20%20%20at%20file%3A%2F%2F%2FUsers%2Ftangaoyuan%2F.nvm%2Fversions%2Fnode%2Fv16.13.0%2Flib%2Fnode_modules%2F%40kadena%2Fkadena-cli%2Flib%2Fcommands%2Fkeys%2Fcommands%2FkeysPlainGenerate.js%3A18%3A46%0A%20%20%20%20at%20processTicksAndRejections%20(node%3Ainternal%2Fprocess%2Ftask_queues%3A96%3A5)%0A%20%20%20%20at%20async%20Command.%3Canonymous%3E%20(file%3A%2F%2F%2FUsers%2Ftangaoyuan%2F.nvm%2Fversions%2Fnode%2Fv16.13.0%2Flib%2Fnode_modules%2F%40kadena%2Fkadena-cli%2Flib%2Futils%2FcreateCommand.js%3A132%3A28)%0A%20%20%20%20at%20async%20Command.parseAsync%20(%2FUsers%2Ftangaoyuan%2F.nvm%2Fversions%2Fnode%2Fv16.13.0%2Flib%2Fnode_modules%2F%40kadena%2Fkadena-cli%2Fnode_modules%2Fcommander%2Flib%2Fcommand.js%3A936%3A5)%0A%20%20%20%20at%20async%20main%20(file%3A%2F%2F%2FUsers%2Ftangaoyuan%2F.nvm%2Fversions%2Fnode%2Fv16.13.0%2Flib%2Fnode_modules%2F%40kadena%2Fkadena-cli%2Flib%2Findex.js%3A16%3A5)&reproduction=Executed%20command%3A%0Akadena%20key%20generate%20--key-alias%3D%22aaa_01%22%20--key-amount%3D%221%22%20

Steps to reproduce the behavior

  1. install in mac
  2. node 16.13.0

What did you expect to happen?

generate key.

Participation

  • I am willing to submit a pull request for this issue.
@blockchain-develop blockchain-develop added the bug Something isn't working label Oct 15, 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

2 participants
@blockchain-develop and others