FaridSafi / react-native-google-places-autocomplete

Customizable Google Places autocomplete component for iOS and Android React-Native apps
MIT License
2.02k stars 855 forks source link

Bug Report crypto.getRandomValues() not supported. #953

Open rodrigodiasf1984 opened 1 month ago

rodrigodiasf1984 commented 1 month ago

image

Additional context

If you are using expo please indicate here:

any help?

Gyanprakash73 commented 1 month ago

I am also facing the same issue

rodrigodiasf1984 commented 1 month ago

I am also facing the same issue

i've downgraded the version to "react-native-google-places-autocomplete": "2.5.6", without ^ , remove the node_modules, yarn.lock and yarn install and pod install, i've tested in ios and android, this works! Hope the problem will be solved in the next version.

DimitrisGounaris commented 1 month ago

Same, had to downgrade to 2.5.6

Gyanprakash73 commented 1 month ago

I am also facing the same issue

i've downgraded the version to "react-native-google-places-autocomplete": "2.5.6", without ^ , remove the node_modules, yarn.lock and yarn install and pod install, i've tested in ios and android, this works! Hope the problem will be solved in the next version.

Thanks, It is working without ^ .

sunnyatmoveai commented 1 month ago

For others who come here, you don't need to downgrade (at least I didn't). I'm on expo 50.0.17 and got around this by installing react-native-get-random-values and simply doing import 'react-native-get-random-values' in my root layout file.

iamdanajr commented 1 month ago

For others who come here, you don't need to downgrade (at least I didn't). I'm on expo 50.0.17 and got around this by installing react-native-get-random-values and simply doing import 'react-native-get-random-values' in my root layout file.

Thanks, it's worked for me.

generosocarbone commented 1 month ago

For others who come here, you don't need to downgrade (at least I didn't). I'm on expo 50.0.17 and got around this by installing react-native-get-random-values and simply doing import 'react-native-get-random-values' in my root layout file.

This didn't work for me BUT I'm not in expo

gaurav-relife commented 1 month ago

I am also facing the same issue

i've downgraded the version to "react-native-google-places-autocomplete": "2.5.6", without ^ , remove the node_modules, yarn.lock and yarn install and pod install, i've tested in ios and android, this works! Hope the problem will be solved in the next version.

Thanks, It is working without ^ .

working for react native 73.9

ChromeQ commented 1 month ago

For others who come here, you don't need to downgrade (at least I didn't). I'm on expo 50.0.17 and got around this by installing react-native-get-random-values and simply doing import 'react-native-get-random-values' in my root layout file.

Thanks, this works. Note that this will require you to rebuild the app and submit a new version to the app stores, if you just want to push updates out over the air (such as expo-updates) then the only option is to downgrade to v2.5.6 as mentioned above.

rnkdsh commented 1 month ago

+1

zainali225 commented 1 month ago

Its using uuid dependency. Remove uuid and use Math.random().

csychenci commented 1 month ago

对于其他来这里的人,您无需降级(至少我没有)。我在 expo 50.0.17 上,通过安装react-native-get-random-values并简单地import 'react-native-get-random-values'在我的根布局文件中执行操作解决了这个问题。

thanks,This is effective for me

nirunnu1 commented 1 month ago

I am also facing the same issue

i've downgraded the version to "react-native-google-places-autocomplete": "2.5.6", without ^ , remove the node_modules, yarn.lock and yarn install and pod install, i've tested in ios and android, this works! Hope the problem will be solved in the next version.

Thanks, it's worked for me. expo 51.0.6 react native 0.75.2

israr-Viltco commented 1 month ago

solve this issue. I’m using react native. you just sample install this package if you using yarn then yarn add react-native-get-random-values OR npm install react-native-get-random-values. only import import 'react-native-get-random-values' in your route files likes, i import index.js and app.js

sunnyatmoveai commented 1 month ago

solve this issue. I’m using react native. you just sample install this package if you using yarn then yarn add react-native-get-random-values OR npm install react-native-get-random-values. only import import 'react-native-get-random-values' in your route files likes, i import index.js and app.js

I should just add that since this is a mobile bundle, there's no code splitting and you shouldn't import multiple times. I doubt it hurts anything but just import once somewhere toward the top of your component tree and you'll be good to go.

khethelogp commented 5 days ago

++