Regression in support for react-native-get-random-values
See original GitHub issueSummary
react-native-get-random-values uses NativeModules.ExpoRandom.getRandomBase64String(byteLength)
to polyfill crypto.getRandomValues()
in Expo Go:
In converting expo-random
to use JSI, we break this polyfill. We should fix this because it is documented in the extremely popular uuid
package.
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
45
Environment
expo-env-info 1.0.3 environment info:
System:
OS: macOS 12.2.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Watchman: 2022.01.24.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
Android NDK: 21.0.6113669
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
npmPackages:
expo: ~45.0.0-beta.9 => 45.0.0-beta.9
react: 17.0.2 => 17.0.2
react-dom: 17.0.2 => 17.0.2
react-native: 0.68.1 => 0.68.1
react-native-web: 0.17.1 => 0.17.1
npmGlobalPackages:
eas-cli: 0.50.0
expo-cli: 5.4.2
Expo Workflow: managed
Reproducible demo
Issue Analytics
- State:
- Created a year ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
How to use Jest to test functions using crypto or window. ...
This seems so straightfoward but isn't working for me; my test continues to fail with the same crypto.getRandomValues()-not-supported message.
Read more >Firebase JavaScript SDK Release Notes - Google
Fixed a regression that prevented Cloud Firestore from detecting the Authentication service during initialization, which prevented some writes from being sent.
Read more >We're Building a Visual Regression Testing Library for ...
This is a library that enables developers to introduce visual regression tests to their apps for iOS and Android (react-native-web is not ...
Read more >Cross Browser Compatibility of crypto.getRandomValues() ...
Web Technology Support of Internet Explorer 10. To create a automation testing strategy for checking your webapps on Internet Explorer 10, you ...
Read more >node-uuid
"Error: Native module not found" error when using uuidv4 in React Native app (non ... Starting on Node.js 15.6, there's support for a...
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 Free
Top 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
Thanks for the PR! This is fixed in the following release of
react-native-get-random-values
:🚢 1.8.0 / 2022-05-02
To clarify, the regression wasn’t introduced by the migration to JSI, but by making
expo-random
an Expo module in general (it was a standard React Native module before). The polyfill assumesexpo-random
is accessible fromNativeModules
object, but now it should also look for it inglobal.ExpoModules
. I’ll make a PR inreact-native-get-random-values
to fix this.