react-native-google-autocomplete
react-native-google-autocomplete copied to clipboard
Empty locationResults
Hi, Great package sir, I'm having an issue for displaying the autocomplete data provided from google API, I've followed all the steps in the readme file, I've created my API key and I've added it to the component. When I start typing the locationResults is always empty, I don't understand is there a way to debug this to see if the problem is related to the API key or some issue in the library itself
<GoogleAutoComplete apiKey={Global.GOOGLE_MAPS_API_KEY}
debounce={debounce}
minLength={minLength}> {({
inputValue,
handleTextChange,
locationResults,
fetchDetails,
isSearching,
}) => (
<React.Fragment>
<Input value={inputValue}
onChangeText={handleTextChange}
placeholder={placeholder}
style={inputStyle}/>
{isSearching && <Spinner size='large'/>}
<View style={styles.mainView}>
<ScrollView style={styles.scrollViewStyle1}
contentContainerStyle={styles.homeView}>
<Text>data: {locationResults}</Text>
{locationResults.map((el, i) => (
<LocationItem
{...el}
fetchDetails={fetchDetails}
key={String(i)}
/>
))}
</ScrollView>
</View>
</React.Fragment>
)}
</GoogleAutoComplete>

I am having the same issue right now, did you figure it out yourself ?
Hi @YannickLeRoux It's actually a problem related to the key API its self I was using, if you can see in the screenshot I shared you can notice that I've got 82 errors related to my API key that wasn't working, so the solution is simply to change your API key. Hope that will work. Let me know so I can close the issue once you've got things working with you.
I have been trying to use your package and I am getting the same error as chaosLegacy. I am just piling up errors in my calls to google places. Any ideas as to how I can debug this?
Same error here
I will check this weekend sorry about that.
I am currently having same error... Did someone figure out??
I think I figured out - This API error happens when you don't set up the payment account for the google api. So, if you use google places api (or google directions api) more than the limit, then the google map api will automatically blocks your request.
Wow I didn't they block your request, I will try to check if they return another status code, maybe I can make the lib return a boolean when you hit a limit. What you think of this ?
@EQuimper Yeah, that would be great!
perfect I will do this, I'm open to pr also if you want to make it @YeonwooSung :)
I still have this error. Any solution?
I still have this error as well. Some sort of error to let us know that it's being blocked would be great.
@cfchacon10 do the api key is web ? Someone did use android or ios api key but don't work. Here we use the web api.
They ask for a request web address for change to http web, google service have the option to set none. Im having the same issue
@memartello I will make a new video about how to setup this