Check to see if Google Maps API integration was successful

I have a self-hosted docker installation of appsmith. I would like to use the Map widget so I have followed these instructions (including restarting the instance:

When I use the widget, I still get “Map Widget disabled”:
image

I’m trying to troubleshoot but don’t know where to look. I’ve tried the grep’ing backend log of the container for ‘map,’ ‘google’ (only returned google-sheets plugin), and the API KEY that is configured, but didn’t find anything about the Google Maps API config that I put in the docker.env file.

cat stacks/logs/backend/backend.log | grep <api key>

Any ideas?

@trebuchet Sorry you are facing issues configuring Google Maps. Were you able to go through the documentation here - https://docs.appsmith.com/setup/instance-configuration/google-maps

Hi @dancia - I did follow that guide. Some other things that I needed to do initially not having used Google Cloud before was create a new GCP project and sign up for Google Maps Platform.

Here are my configs, do they look right?



Screen Shot 2022-06-14 at 10.28.17 AM

@trebuchet Everything seems to be as in the docs. The only difference I see is the Website restrictions. Can you select HTTP referrers and add *.appsmith.com/*

Just tried that - no luck. Should I be seeing anything on the docker backend log or some other log when I restart the container, indicating that API key configuration properly took?

Not seeing any requests coming in on the Google side so looks like the app isn’t reaching out.

Also, restart your instance - https://docs.appsmith.com/setup/instance-configuration#configuring-docker-installations

In the meantime, I’ll check if someone from our DevOps team can assist you with this.

Thanks, @dancia. Have been restarting my instance during every test.

Hi @trebuchet ,
In the GCP console, please set the Application restrictions to > IP addresses > (IP address of your Appsmith host)
If you have setup Appsmith locally on your machine, you can obtain your IP address by running the cmd:
curl ifconfig.me

@trebuchet , If the above config change does not fix the issue, then could you also verify if your current APPSMITH_GOOGLE_MAPS_API_KEY value is correct and ensure that there is no duplicate entry for the same in the docker.env file.

Confirmed the key is correct and added my IP address as an application restriction. Still no luck. Is it a problem that I have not configured the OAuth consent screen on Google?

Looking into this I’m not sure it would be necessary.

Apologies! I found the reason why it wasn’t working - I did not realize there was already a APPSMITH_GOOGLE_MAPS_API_KEY= line in the docker.env file that is created automatically via the docker installation. As a result, the line that I added to the top of the file was being invalidated by the later line that didn’t have a key filled in. Apologies for spinning everyone’s wheels!

1 Like

Hey glad you were able to figure that out :slight_smile: