11

I am working on an Android application with Kotlin as the development language. The app shows a map and is supposed to load markers. However, the map loads but the markers do not. I get a security exception GoogleCertificatesRslt: not allowed which I found out could be caused by versions. The package that I am using is implementation 'com.google.android.gms:play-services-maps:18.0.2'. Does someone know what the problem is and the possible solution?

Gradle file:

plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'

}

android { compileSdk 32

defaultConfig {
    applicationId "com.ao.wildfire"
    minSdk 21
    targetSdk 32
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
    jvmTarget = '1.8'
}
buildFeatures {
    viewBinding true
}

}

dependencies {

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.android.gms:play-services-maps:18.0.2'

// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation "com.squareup.okhttp3:okhttp:4.9.0"

// Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0'

// Coroutine Lifecycle Scopes
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.1"

}

Error

W/MobStoreFlagStore: Unable to update local snapshot for com.google.android.libraries.consentverifier#com.ao.wildfire, may result in stale flags.
java.util.concurrent.ExecutionException: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.ao.wildfire, atk=false, ver=220920031.true (go/gsrlt)
    at agv.s(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):3)
    at agv.get(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):2)
    at aif.g(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):2)
    at wy.c(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):1)
    at xe.run(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):0)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)
 Caused by: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.ao.wildfire, sha256=[bbe56829a1f8ca5eb01bb8f0feefd7a5a88d6a4d9d7069b33b2ba4d3fc76ec7e], atk=false, ver=220920031.true (go/gsrlt)
    at android.os.Parcel.createException(Parcel.java:2071)
    at android.os.Parcel.readException(Parcel.java:2039)
    at android.os.Parcel.readException(Parcel.java:1987)
    at ef.aZ(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):2)
    at qs.a(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):4)
    at ij.e(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):2)
    at ji.t(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):2)
    at ji.u(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):3)
    at ji.e(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):2)
    at jm.handleMessage(:com.google.android.gms.dynamite_mapsdynamite@220920068@22.09.20 (100700-0):69)
    at android.os.Handler.dispatchMessage(Handler.java:103)
    at android.os.Looper.loop(Looper.java:214)
    at android.os.HandlerThread.run(HandlerThread.java:67)
Macik
  • 146
  • 1
  • 7

1 Answers1

1

Ongoing Issue

There are other Google Maps Platform users who are also having this issue, so there is an ongoing entry for it in the Google Issue Tracker.

You can view and star the issue here: https://issuetracker.google.com/228091313

Please note that the Issue Tracker entry above is the authoritative source for public information regarding the aforementioned issue, and all publicly-relevant updates will be posted there.

Regarding the error, it looks like that the issue is only reproducible with the LEGACY renderer of Google Maps SDK for Android and not on the LATEST renderer.

Though I can see that you are requesting the LATEST renderer, it could be that your app still loads using the LEGACY renderer. So here's what you can do.

Using Maps SDK's Latest renderer

I'll just quote here what the Googler said on the issue here: https://issuetracker.google.com/issues/228091313#comment44

  • From our investigation so far, we believe this issue only happens on Maps SDK's LEGACY renderer, and not on the LATEST renderer.
  • You can request the LATEST renderer by calling MapsInitializer.initialize(). Please follow the guide at https://developers.google.com/maps/documentation/android-sdk/renderer.
  • Please use OnMapsSdkInitializedCallback to determine which renderer version is actually returned.
    • By default the LATEST renderer is not included in the Google Play services in devices. So even though your app requests for the LATEST renderer, the callback may show that your app is still getting the Legacy one.
      • When the LATEST renderer is requested for the first time, Google Play services will request the renderer to be downloaded from our servers. It could take some time until the LATEST renderer is downloaded and installed on the device and ready to be used. It is usually completed in minutes, but could take up to a few hours.
    • Furthermore, the Latest renderer requires devices on Android 5.0 (API level 21) or later, having 2 GB or more of data storage, and having Google Play services version 21.39.14 or later installed.

But all in all, based on the investigation of the Google team, this is just a harmless, yet annoying warning message. It does not cause or show any problems on Maps SDK functionality. So I don't think this is the one that's causing your markers not to show.

It was also mentioned on the bug that there's already an internal issue filed to remove the java.lang.SecurityException warning messages from Android log. Currently there's no target release date for this. So it would be good to follow the issue for updates.

Hope this helps!

Yrll
  • 1,619
  • 2
  • 5
  • 19