Uncaught Error: Secure random number generation is not supported by this browser
See original GitHub issueHello,
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:
- Created 3 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 usingsimple-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 withsimple-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 🙃@hbirler what you injected with @rollup/plugin-inject? I am also having same issues while using svelte and vite