uuid library doesn't work well with expo
Opened this issue · 6 comments
Describe the bug
Error: crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported
Reproduction and solution
Use it with any expo app, simply add the react-native-google-places-autocomplete@2.5.7
Solution
After i found the error originating from the uuid library, i checked the latests commits and i noticed it was added recently so i downgraded to 2.5.6 which solved the issue.
i think this should be helpful to fix the issue.
Additional context
react-native-google-places-autocomplete@2.5.7
react-native@0.74.5
- iOS
- Android
- Web
If you are using expo please indicate here:
- I am using expo
+1 using Metro
Hello, I'm having this issue too
+1 using Metro;
Android;
react-native-google-places-autocomplete@2.5.7
react-native@0.74.1
I've created a pull request that integrates the react-native-get-random-values
polyfill, which should resolve this problem. This addition ensures that the uuid
library functions correctly within the React Native environment by providing the necessary crypto
functionality.
Here's the link to the PR for easy access: #952
@Arshiash80 I am getting this same error after instaling this package can you help me:
my expo version is : "~52.0.11",
"react-native-google-places-autocomplete": "^2.5.7",
@Arshiash80
worked with "react-native-google-places-autocomplete": "2.5.6",
but its not good practice.