Skip to content
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

Empty locationResults #11

Open
chaosLegacy opened this issue Sep 10, 2018 · 15 comments
Open

Empty locationResults #11

chaosLegacy opened this issue Sep 10, 2018 · 15 comments

Comments

@chaosLegacy
Copy link

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>

screen shot 2018-09-10 at 2 56 11 am

@YannickLeRoux
Copy link

I am having the same issue right now, did you figure it out yourself ?

@chaosLegacy
Copy link
Author

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.

@rynpowers
Copy link

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?

@iamshadmirza
Copy link

Same error here

@EQuimper
Copy link
Member

I will check this weekend sorry about that.

@YeonwooSung
Copy link

I am currently having same error... Did someone figure out??

@YeonwooSung
Copy link

YeonwooSung commented Feb 21, 2019

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.

@EQuimper
Copy link
Member

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 ?

@YeonwooSung
Copy link

@EQuimper Yeah, that would be great!

@EQuimper
Copy link
Member

perfect I will do this, I'm open to pr also if you want to make it @YeonwooSung :)

@guiguerino
Copy link

I still have this error. Any solution?

@cfchacon10
Copy link

I still have this error as well. Some sort of error to let us know that it's being blocked would be great.

@EQuimper
Copy link
Member

@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.

@memartello
Copy link

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

@EQuimper
Copy link
Member

@memartello I will make a new video about how to setup this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants