Closed LinusU closed 1 year ago
Released as 🚢 1.9.0 / 2023-05-18
Seeing The method or property expo-crypto.getRandomBytes is not available on android, are you sure you've linked all the native dependencies properly?
after upgrading to 1.9.0 with Expo 48.
My android build logs suggest that expo-crypto
is being linked
> Configure project :expo
Using expo modules
- expo-application (5.1.1)
- expo-camera (13.3.0)
- expo-constants (14.2.1)
- expo-crypto (12.2.1)
...
@adamhari did this previously work on 1.8.0? Does this happen when you call the global crypto.getRandomValues
? Are you building the app via EAS, or running with Expo Go?
@aleqsio is there a possibility that global.expo.modules.ExpoCrypto.getRandomValues
could exists and logging/throwing the following when accessed? 🤔
The method or property expo-crypto.getRandomBytes is not available on android, are you sure you've linked all the native dependencies properly?
@adamhari did this previously work on 1.8.0? Does this happen when you call the global
crypto.getRandomValues
? Are you building the app via EAS, or running with Expo Go?@aleqsio is there a possibility that
global.expo.modules.ExpoCrypto.getRandomValues
could exists and logging/throwing the following when accessed? 🤔The method or property expo-crypto.getRandomBytes is not available on android, are you sure you've linked all the native dependencies properly?
It works on 1.8.0, I reverted to using that. It happens because I'm using expo-auth-session
which uses expo-crypto
here. I'm building with EAS, not using Expo Go.
It happens because I'm using expo-auth-session which uses expo-crypto here.
Hmm, I'm not sure I follow here, is it expo-auth-session
that gives you the error? And you can work around it by downgrading react-native-get-random-values
to 1.8.0? 🤔
It happens because I'm using expo-auth-session which uses expo-crypto here.
Hmm, I'm not sure I follow here, is it
expo-auth-session
that gives you the error? And you can work around it by downgradingreact-native-get-random-values
to 1.8.0? 🤔
Yeah, I'm not using expo-crypto
directly, it's through the latest expo-auth-session
(4.0.3)
expo-auth-session
shouldn't be dependent on react-native-get-random-values
though? So I'm not sure how that relates to this package... 🤔
@aleqsio is there a possibility that
global.expo.modules.ExpoCrypto.getRandomValues
could exists and logging/throwing the following when accessed? 🤔
Hmm, not sure why this would happen, we didn't touch getRandomBytes other than moving it to a different package and I can't see anything in the code that would indicate it can break.
@adamhari If you can provide a minimal reproduction I can take a look 🙏
Hey folks, The method or property expo-crypto.getRandomBytes is not available on android, are you sure you've linked all the native dependencies properly?
is fixed on expo-crypto@12.4.0
using "expo": "48.0.19",
The current code works but uses deprecated functions on SDK 48, this PR adds a code path that calls uses
getRandomValues
fromexpo-crypto
.Fixes #41