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.

Your browser does not have secure random generator. If you don’t need unpredictable IDs, you can use nanoid/non-secure.

See original GitHub issue

Environment

React Native Environment Info: System: OS: macOS High Sierra 10.13.6 CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz Memory: 685.06 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.12.0 - /usr/local/bin/node Yarn: 1.10.1 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 Android SDK: API Levels: 23, 25, 26, 27, 28 Build Tools: 23.0.1, 25.0.0, 26.0.1, 27.0.3, 28.0.3 System Images: android-28 | Google Play Intel x86 Atom IDEs: Android Studio: 3.1 AI-173.4819257 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: ^16.6.1 => 16.7.0 react-native: ^0.57.7 => 0.57.8 npmGlobalPackages: react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7

Description

I get Your browser does not have secure random generator. If you don’t need unpredictable IDs, you can use nanoid/non-secure. after upgrading to react version Imgur

Reproducible Demo

upgrade react-native version from 0.55 to 0.57

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
lnanhkhoacommented, Dec 27, 2018

Bug when you upgrade new version ( 0.57.8) Fix in : node_modules/remotedev-utils/index.js in line : 23 change var _nanoid = require('nanoid/non-secure')

Can anyone else move this issue to pull request ???

3reactions
atoamicommented, Dec 25, 2018

I am facing this issue as well.

React & React Native versions.

"react": "16.6.3",
"react-native": "0.57.8"

But it disappears once I disable redux debugger wrapper used by remote-redux-devtools. You can check the details on my react-native-starter-kit repo. https://github.com/wagng/react-native-navigation-redux-starter-kit/blob/fd36397e641e116742fc512b982dfa28a5c5018b/src/redux/store/store.js#L25 I’ve been using remote-redux-devtools for all of my react-native projects, but I’ve never faced this issue. Would be great to get correct answer from react. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nanoid can't be used in react-native - Stack Overflow
Scenario: I just import to the nanoid package. import { nanoid } from 'nanoid'; Error: React Native does not have a built-in secure...
Read more >
Nano ID - nanoid - npm
Web Workers do not have access to a secure random generator. Security is important in IDs when IDs should be unpredictable. For instance,...
Read more >
Why is NanoID Replacing UUID? - Bits and Pieces
In most of the random generators, they use unsafe Math.random() . But, NanoID uses crypto module and Web Crypto API which is more...
Read more >
nanoid/README.md - UNPKG
6, A tiny, secure, URL-friendly, unique string ID generator for JavaScript. ... 134, If you don't need unpredictable IDs, but you need React...
Read more >
Nano ID : Unique string ID Generator for JavaScript | jQuery ...
If you don't need unpredictable IDs, but you need Web Workers support, you can use non‑secure ID generator. const nanoid = require('nanoid/non-secure') ...
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