[Google Places] Stops working at 3pm AEST every day

[Google Places] Stops working at 3pm AEST every day

  
Forge Component
(5)
Published on 2017-04-03 by Ouen Worth
5 votes
Published on 2017-04-03 by Ouen Worth

Hi

Great API - thanks.

Trouble is - it stops working for us around 3pm everyday (Australian Eastern Standard Time)

Next day it's fine.

Is there something a housekeeping script that runs preventing it from working ?



Hello Paul. I'm also using this component, without any problems whatsoever. I'm in the same timezone as yourself.

Could you share what error do you get when it stops working? Could it be that you are reaching some quota on the service?

Hi Leonardo

I checked the Google API key info - we use less than 1,000 calls / day so should be okay.

There is no error as such - the widget\AddressAutocomplete stops providing lookups when entering an address.

It always stops working around 3pm - no errors in the log or anything (that I can see)

Do you use the same component ?

Hum, I was wrong, sorry. I just checked and it's not the same component. We just integrated directly with the REST API: https://maps.googleapis.com/maps/api/place/autocomplete/json?input={input}&types={types}&components={components}&location={location}&radius={radius}&key={key}.

I saw that the widget you're referring to uses the Javascript API, so please check if you have any Javascript errors when you're using the component. If you want, you can give me a public link and I can test it at around that time, and try to find out why it's not working.

Thanks for checking.

The fact it works fine all day (until 3pm) rules out a JS error - also no errors are coming in. I might have to switch to using REST services if I don't find a solution . . .

The app sits behind OKTA SSO - so I can't share I'm afraid.

I wouldn't rule out Javascript errors. Surely, there must be some error at some point.

Having said that, you could try using the server-side REST API. You can find documentation here: https://developers.google.com/places/web-service/autocomplete and you should be able to import the service by mapping the inputs described in the documentation, and importing the response JSON structure that is also found in the documentation.

Solution

My bad - didn't realise it's a 1,000 limit unless you register your credit card !

Solution