Bug: Admob+Unity-adapter+subscription -> crash of GatewayException

16 views
Skip to first unread message

Liran Barsisa

unread,
2:26 PM (8 hours ago) 2:26 PM
to Google Mobile Ads SDK Developers
I use Admob with mediation and various ad networks as sources for it.
One of them is Unity.
I've noticed recently that only on the release version of various of my apps, when I choose to purchase subscription, the app crashes with logs related to Admob's Unity adapter.

I've noticed this issue via Crashlytics, here, here and here, meaning on these apps:
https://play.google.com/store/apps/details?id=com.lb.vocalearn
https://play.google.com/store/apps/details?id=com.lb.backup_plus
https://play.google.com/store/apps/details?id=com.lb.get_my_phone_number

To reproduce, install one of these apps (I tested recently on VocaLearn) just purchase subscription. You don't even need to show any ad before. I can add your email to the test users, so that subscription would be for free. I don't know if this will occur on promo codes, and I don't know if it always occur, but it's quite often at least for me.
If it doesn't occur, cancel the subscription, uninstall the app, and when the subscription ends, start the steps again.

I've attached here a video of how to reproduce on VocaLearn app.

The relevant dependencies are:
    implementation("com.google.android.gms:play-services-ads:24.7.0")
    implementation("com.unity3d.ads:unity-ads:4.16.3")
    implementation("com.google.ads.mediation:unity:4.16.3.0")
    implementation("com.android.billingclient:billing-ktx:8.1.0")



The exception is:

 GatewayException(message=unknown error, throwable=java.lang.IllegalStateException: unknown error, reason=gateway_universal, reasonDebug=unknown error)
  at com.unity3d.ads.core.domain.AndroidHandleGatewayUniversalResponse.invoke(AndroidHandleGatewayUniversalResponse.kt:18)
  at com.unity3d.ads.gatewayclient.CommonGatewayClient.executeWithRetry(CommonGatewayClient.kt:81)
  at com.unity3d.ads.gatewayclient.CommonGatewayClient.access$executeWithRetry(CommonGatewayClient.kt:44)
  at com.unity3d.ads.gatewayclient.CommonGatewayClient$executeWithRetry$1.invokeSuspend(CommonGatewayClient.kt)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:829)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
  Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [s1{Cancelling}@70c2c62, Dispatchers.Default]
crash when installing and purchasing subscription.mp4

Liran Barsisa

unread,
2:47 PM (8 hours ago) 2:47 PM
to Google Mobile Ads SDK Developers
As this is related to Unity and Google IAP, I've reported to them too. Here's on the issue tracker:

https://issuetracker.google.com/issues/460166664

Hopefully one will solve this. To me it seems like some Proguard issue of one of the dependencies could solve this, but still shouldn't occur...

Mobile Ads SDK Forum Advisor

unread,
6:58 PM (4 hours ago) 6:58 PM
to lbl...@gmail.com, google-adm...@googlegroups.com
Hi,

Thank you for contacting Mobile Ads SDK support team.

As per the logs, it seems like the issue is not related to Mobile Ads SDK. So, we recommend contacting the appropriate team to ensure this issue is resolved.

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-11-12 23:57:33Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vTKlH:ref" (ADR-00339177)



Liran Barsisa

unread,
7:11 PM (3 hours ago) 7:11 PM
to Google Mobile Ads SDK Developers
Who's the "appropriate team" and how can I contact them? 
Also, why do you think it's not related to Admob SDK with Unity ?
Isn't Admob responsible of the adapter of Unity , as it's officially supported on the list here:
https://developers.google.com/admob/android/choose-networks
https://github.com/googleads/googleads-mobile-android-mediation

I now tested your claim, and removing the unity dependency doesn't cause the issue, so it's incorrect to say it's not related to Admob with Unity.
This is what I removed:


    implementation("com.unity3d.ads:unity-ads:4.16.3")
    implementation("com.google.ads.mediation:unity:4.16.3.0")



Reply all
Reply to author
Forward
0 new messages