Closed MortadhaFadhlaoui closed 1 year ago
Running the ios build after upgrading to Expo SDK 48, we get this error:
TypeError: Cannot read property 'getRandomBase64String' of undefined, js engine: hermes
After some investigation seems like this library needs to be updated because it's using ExpoRandom after expo-random was deprecated in SDK 48
ExpoRandom
/** * @param {number} byteLength * @returns {string} */ function getRandomBase64 (byteLength) { if (NativeModules.RNGetRandomValues) { return NativeModules.RNGetRandomValues.getRandomBase64(byteLength) } else if (NativeModules.ExpoRandom) { // Expo SDK 41-44 return NativeModules.ExpoRandom.getRandomBase64String(byteLength) } else if (global.ExpoModules) { // Expo SDK 45+ return global.ExpoModules.ExpoRandom.getRandomBase64String(byteLength); } else { throw new Error('Native module not found') } }
1.8.0
0.71.4
IOS
JavaScript runtime Hermes
Workflow React Native (without Expo)
Device Simulator
Acknowledgments Yes
dup of https://github.com/LinusU/react-native-get-random-values/issues/41
Description
Running the ios build after upgrading to Expo SDK 48, we get this error:
TypeError: Cannot read property 'getRandomBase64String' of undefined, js engine: hermes
After some investigation seems like this library needs to be updated because it's using
ExpoRandom
after expo-random was deprecated in SDK 48React Native Get Random Values version
1.8.0
React Native version
0.71.4
Platforms
IOS
JavaScript runtime Hermes
Workflow React Native (without Expo)
Device Simulator
Acknowledgments Yes