0

I am working on flutter application using google maps, everything works fine while developing. after publishing app to play store maps stop working it opens a blank map with google logo on it only. in my code when i change my package name to different name map works well. when i rename it back to the original package name (name on play store) it doesn't work

what i try to do

  • i try to clean code
  • invalidate cash and restart
  • un install and install the application
  • create new map API key
  • i also try to restrict my map API key with SHA-1 from Play App signing. keep Map key with no restriction

Nothing works. and this message is displayed on log

Unexpected response code 503 for https://clients4.google.com/glm/mmap/api

map will only work when i change the package name to different name of the on exists on play store. But i need to keep the package as it is on store

Amal Masri
  • 13
  • 2
  • try to run your app in release mode using `flutter run --release` in the terminal and update your post with output logs – Muhamad Jalal Nov 16 '21 at 08:13
  • Read this : https://stackoverflow.com/questions/61331519/unexpected-response-code-400-from-google-maps-in-flutter – Awais Rehman Nov 16 '21 at 08:21
  • map still not appears, and error not appears in log also @MuhamadJalal – Amal Masri Nov 16 '21 at 08:51
  • 503 Service Unavailable means you request a live service that does not enabled in google console – Muhamad Jalal Nov 16 '21 at 08:53
  • please visit the [googleAPI](https://console.cloud.google.com/apis/library) to see if you enabled all APIs you need – Muhamad Jalal Nov 16 '21 at 08:55
  • Maps SDK for Android ,Places API. both services are enabled. @MuhamadJalal – Amal Masri Nov 16 '21 at 09:30
  • Now we confirmed that the API enabled and logs have nothing to display, the last step to solve, please provide us with the code snippet you use with Google Map to reproduce the issue. – Muhamad Jalal Nov 16 '21 at 09:39
  • Did you get any email like the one [here](https://stackoverflow.com/questions/67731975/unexpected-response-code-503-from-google-maps-in-android-studio)? – Nelson Jr. Nov 18 '21 at 23:24

1 Answers1

0

I faced similar issue where map did not load on playstore release version, but it worked locally. On released version downloaded from playstore, only google logo was showing at the bottom of the map.

I had to following:

  1. under playstore console, I had to copy SHA 1 from 'App integrity' > 'App signing key certificate' > 'SHA-1 certificate fingerprint'.
  2. add above SHA 1 under google cloud API 'credentials' when setting API key for 'Maps SDK for Android'.

released version magically worked after above steps.

SandDev
  • 78
  • 2
  • 6