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

Fails to generate strings in Electron #34

Closed
slashinfty opened this issue Apr 16, 2022 · 1 comment
Closed

Fails to generate strings in Electron #34

slashinfty opened this issue Apr 16, 2022 · 1 comment

Comments

@slashinfty
Copy link

Unsure if it is due to it being Electron or running webpack-dev-server, but the catch block here runs indefinitely:

function safeRandomBytes(length) {
  while (true) {
    try {
      return randomBytes(length);
    } catch(e) {
      continue;
    }
  }
}

The fact that randombytes operates differently in Node and in the browser seems like it could be the underlying cause.

@muhammadsumon
Copy link

Same! I can't use it in React Js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants