Google map not working in android app via appium(Java)

I have a implementation of google map in my android application , while running the app via appium map is never loaded and give me a brown screen, but if the app is already installed , on running the app via appium loads the map correctly.

Even while using the app manually map is loading properly.

Error i am getting in console is:
07-28 14:06:05.760: E/Google Maps Android API(7716): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
07-28 14:06:05.780: E/Google Maps Android API(7716): In the Google Developer Console (https://console.developers.google.com)
07-28 14:06:05.780: E/Google Maps Android API(7716): Ensure that the “Google Maps Android API v2” is enabled.
07-28 14:06:05.780: E/Google Maps Android API(7716): Ensure that the following Android Key exists

just curious if anyone has found a solution for this, I am getting the same error, and haven’t been able to resolve it.
Any possible solutions would be greatly appreciated!!

Thank you in advance

I am experiencing the same issue.
If the Debug version is installed and run through Android Studio, I get an API token.
If the app is installed through Appium’s desired capability command, I get the error message as OP.

Even if I run the app (installed by appium) manually, it doesn’t load the map for the same reason.

Hi,
it is probably because appium resigns apk with another certificate. Google map is bound to certificate and when it is different, you can see complains in log.
Check the log, maybe there is actual certificate SHA1. Put it into Google Console and register new API KEY.
— Jaroslav

Hi,

Still not able to load gmap into my application.
Any way around ?

I have found that when App is installed through appium, there is a problem in loading Gmap.
However, if user opens the pre-installed app(Not installed via appium), gmap is loaded without any problem

Hi Pavrda,

Still we are getting same brown screen while loading Google Map (Please refer the attached screenshot for the same) from Appium and where Application is installing via Appium.

Also we have tried with below different options.However still issue is not resolved.

  1. Checked with Desired Capabilities for “noSign” as true and false.
  2. We have resigns apk with another certificate (using this procedure : Testing World  Experienced in making experts)
  3. Checked with below Desired Capabilities
    • useKeystore
    • keystorePath
    • keystorePassword

So if anyone having resolution for this issue then please share steps with required details for the same.

Note: If we are manually installing the Application on device and after that opening the Google Map via Appium then it is successfully loading and opening.

Thanks in Advance.

Regards,
Navin Chaudhari

Any solution for this issue ?

I solved this issue with useKeystore and keystorePath