-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
null is not an object
error for getRandomBase64 when running with Expo SDK 40.0.0
#25
Comments
@brentvatne are you familiar with any changes to Expo in SDK 40 which could have caused this? 🤔 |
my guess is that you are using a custom if this isn't the case, let me know and create a mcve and i can look into it more |
Hi Brent, thanks yeah it looks like I missed that step. Making the required metro-config changes resolves my current error, but now I'm running into two separate errors, one for each iOS and Android (we don't deploy to web or Windows), do you have any idea why I'd be hitting them? On Android the app opens but displays this warning in console and in the app. I've read the expo.fyi and confirmed that my codebase contains no "__expo." or "Expo." references (including node_modules), so it's strange that I'd be running into this warning in the first place.
On iOS the app doesn't open, just crashes with SIGABRT and errors in console. Nothing appears in the simulator System Log, so that doesn't help me. We're resolving the module.exports (in
|
@grantaveryatgfs - your code definitely accesses a global expo property somewhere, that is the only way that you would get that warning (implementation: https://github.com/expo/expo/blob/f266600485270472412f2072235bcd8ec45d3c7e/packages/expo/src/globals.ts / https://github.com/expo/expo/blob/f266600485270472412f2072235bcd8ec45d3c7e/packages/expo/src/Expo.fx.expo.tsx#L52-L63). as for the other error that you're encountering, it seems like maybe there's a problem with your simulator? sadly it can be a problematic sometimes. https://forums.expo.io/t/running-project-on-ios-simulator/43413/3 if all else fails, i'd suggest doing some manual debugging: https://github.com/expo/fyi/blob/master/manual-debugging.md @LinusU - feel free to close this issue and @grantaveryatgfs can repost to https://forums.expo.io or https://github.com/expo/expo/issues if he has some other issues |
you probably have node_modules in your gitignore and it's being skipped in your search. also, it can be exposed under any of these properties:
so |
Like I said, I removed everything from my gitignore so that isn't a factor. I've searched for each of those specific examples but there's nothing. I'll keep thinking of possibilities, but I'm at a loss for where these references could be hiding. |
Whelp, apparently VSCode and Finder weren't indexing/showing literally all files/file contents, because if I search in Intellij by Directory for all places I see the culprit is in our version of react-native-paper (https://github.com/callstack/react-native-paper/blob/3.0/src/components/MaterialCommunityIcon.tsx#L20-L25). I should be able to update that to a newer version and resolve the issue. Thanks, and sorry for taking up your time 😅 |
Hello, I'm working on upgrading my project to Expo 40 from 39, but I'm running into this error in the
getRandomBase64.js
file ofreact-native-get-random-values
on both iOS and Android. After some playing around with the package code, it appears thatRNGetRandomValues
is null.One point of confusion is why my code would even hit
getRandomBase64.js
, since it is on the managed workflow and #13 seems to say that my project should be hitting thegetRandomBase64.expo.js
version instead. If I force that (by running thegetRandomBase64.expo.js
code ingetRandomBase64.js
), I don't get the error any more (I get a different error aboutAsyncStorage
, but that appears to be further down the line and not related to this package). When I run the same project and same package with SDK 39, I don't get the error and I can confirm that it is successfully running the.expo.js
version ofgetRandomBase64
(NativeModules.ExpoRandom.getRandomBase64String
). If I force the project with SDK 39 to hitNativeModules.RNGetRandomValues.getRandomBase64
, it errors as expected.Has something changed between SDK 39 and 40 that would cause this issue between the
.expo.js
and.js
files, either on the package side or the SDK?(EDIT: fixed a mismatched reference to the two different getRandomBase64 files)
The text was updated successfully, but these errors were encountered: