Secure random number generation is not supported by this browser
See original GitHub issueI want to generate mnemonic in react-native. I use bip39 with browserify, and getting the error:
Error: Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11
OS: MacOS node: v9.10.0 npm: 5.6.0 react-native-cli: 2.0.1 react-native: 0.57.1 “expo”: “^32.0.0” “bip39”: “^3.0.2”
Here is the project
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Error: Secure random number generation is not supported by ...
Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11. Works fine for iOS debug.
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 ...
Original error: Error: secure random number generation not supported by this browser use chrome, FireFox or Internet Explorer 11.
Read more >Crypto.randomUUID() - Web APIs - MDN Web Docs
The randomUUID() method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.
Read more >SecureRandom - Android Developers
Constructs a secure random number generator (RNG) implementing the default ... the first Provider that supports a SecureRandom (RNG) algorithm is returned.
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
Please do your own dev work.
This library is only guaranteed to work in the browser and NodeJS environments.
Anything else will require you to figure out how to make it work, trial and error.
Do what I said and it will work.
Synchronus calls use SJCL which relies on crypto, which react cannot use. Asynchronus calls use the native iOS/Android calls.
You need to do the following for this to work.
1 - install react-native-random-bytes
2 - shim node stream lib like follows (I found the shims here):
3 - And finally do:
yarn add events
since readable-stream depends on it