question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught Error: Secure random number generation is not supported by this browser

See original GitHub issue

Hello,

I really want to use this library but I receive the error below in the JS console when I try to make the first example working : Uncaught Error: Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11

Tested on Firefox and Chrome, they are up to date of course. I tried to use the simplepeer.min.js standalone script directly in a <script> tag as well as the browserify method.

Thanks for your help.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
hbirlercommented, Feb 13, 2022

Hi @GagnDeep , I actually don’t remember what exactly I had done. I could fix the error with crypto but then I believe I got other errors from other node builtins that I did not manage to polyfill properly. In the end I gave up on using simple-peer and implemented something based on https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Perfect_negotiation. I did not even save my experiments with simple-peer; I don’t have the code anymore. I am not that experienced with node and its ecosystem so rewriting stuff felt less frustrating than fixing packaging errors 🙃

0reactions
GagnDeepcommented, Feb 9, 2022

@hbirler what you injected with @rollup/plugin-inject? I am also having same issues while using svelte and vite

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Secure random number generation is not supported by ...
The error looks like a message from the randombytes package (randombytes/browser.js). crypto.getRandomValues isn't getting defined early enough.
Read more >
Web3 ReactNative Error Secure random number generation is ...
Error: Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11.
Read more >
secure random number generation not supported by this ...
Uncaught Error : Error during encryption. Original error: Error: secure random number generation not supported by this browser
Read more >
Web3 ReactNative Error Secure random number generation is ...
Coding example for the question Web3 ReactNative Error Secure random number generation is not supported by this browser-React Native.
Read more >
[ERROR]: Secure random number generation is not supported ...
在creator 1.8.2报错[ERROR]: Secure random number generation is not supported by this browser. Simulator: Use Chrome, Firefox or Internet ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found