SearchBox Geographic Places not working - APIs are set up

Hi i have no idea what is wrong with my Searchbox to auto fill geographic places. No results pop when I type in home addresses, cities and states… I have a Personal bubble account, both Google APIs all set in my settings, billing set up in Google API Console, Google Places plug in i have with API key… Google API works in my bubble database for geographic addresses.

This searchbox worked literally once when setting Prefer Results around “United States” . But it has not worked before and after the single successful attempt in Preview… What am I missing??? I have tried everything with Radius, State prefer results, etc.

2 Likes

Welcome to the forum @johnvandall

Could you show us what conditionals do you have applied there? And your API settings?

Hey @jmalmeida … conditionals are just default searchbox. Public API settings, both workflow & object API endpoints enabled… Again, everything is all set & enabled on the Google API Console side. In Google Console i see metrics & successful requests etc (including a single Google Places request, which was probably my x1 successful use in my Preview). Also, the geofencing with my data is working properly, too. I am so stumped as to why this searchbox is not providing results when i start typing!
I read that a possible option is to regenerate Google API keys and see what happens. Is that a thing that the API keys could be faulty with bubble under the hood?

It’s strange that it’s worked once and then has stopped.

I’d make the usual checks. Check:

  • if creating another searchbox solves the problem
  • if the Google Developer App is correctly set up: Working with Location Data - Bubble Docs (make sure your app domain is listed in Website restrictions and that you have the 5 APIs selected: Maps JavaScript API, Geolocation API, Places API, Time Zone API, Geocoding API)
  • if the API keys are correct (check for blank spaces before and after the keys)
  • if regenerating API keys solves the problem

Also check the console for errors in developer tools (F12 or right-click > ‘Inspect’) and try running a direct query to Google API in Postman or similar

1 Like

I was just dealing with this issue.

Deleted my Google API codes in app settings and it’s now working.

Not sure what’s up.

1 Like

@doublejay when you say delete… you mean replaced them with new codes?

Nope, just deleted and left running on (I’m assuming) Bubble’s API codes.

My app is still not published.

Hello all, i figured it out. I regenerated my API keys, but then I noticed for the Client API I messed up my Restricted URLs. I was confused by the Bubble documentation in setting up API keys for this step…


I followed this literally thinking it was required to do “https://myapp.bubbleapps.io/” … but Bubble was just using that as an example, ha!.. The correct URL for me is “https://myapp.com/” This obviously makes sense to do the latter. Now my Google Client API key knows to be enabled for my site! Funny how it allowed me to use the Search Box one time, maybe there was a hiccup in the API call that allowed it (i was attempting a lot!).

Anyway, hope this helps others that might make the same oversight (literal-sight?). And @Bubble if you see this post, maybe make the Google API documentation a little more clear that the user DOES NOT need to enter the URL with the “bubbleapps.io” extension… I have zero experience in Google API platform, so its possible this could be confusing for others (or not, just a silly one-off mistake by me)

5 Likes