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

33 views
Skip to first unread message

Liran Barsisa

unread,
Nov 12, 2025, 2:26:23 PM (2 days ago) Nov 12
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,
Nov 12, 2025, 2:47:46 PM (2 days ago) Nov 12
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,
Nov 12, 2025, 6:58:25 PM (2 days ago) Nov 12
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,
Nov 12, 2025, 7:11:59 PM (2 days ago) Nov 12
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")



Mobile Ads SDK Forum Advisor

unread,
Nov 13, 2025, 2:12:04 AM (yesterday) Nov 13
to lbl...@gmail.com, google-adm...@googlegroups.com
Hi,
 
Thank you for getting back to us.

I understand your concern but please note that our Mobile Ads SDK Support team is not able to test or debug apps distributed through TestFlight or production builds.

I have tested Google Sample Project with the provided dependencies but not able to replicate the reported issue. Could you confirm whether the mentioned issue is reproducible in our sample project after adding the relevant code? If so, please share the following details via reply to author option? for further investigation:

  • sample project that replicates the issue

  • Steps to reproduce the issue 

  • Affected device information if its happening on specific devices

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=500Ht00001vTKlHIAW&entry.80707362=00339177

2. Fill out all fields, and attach your file(s).

3. Please reply back to this thread when you have uploaded your file(s). Please do not share this link.


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-11-13 07:10:53Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vTKlH:ref" (ADR-00339177)



Liran Barsisa

unread,
Nov 13, 2025, 4:15:57 AM (yesterday) Nov 13
to Google Mobile Ads SDK Developers
I've already provided the information of each of these, and also attached videos, bug reports and logs if you just visit the link on the issue tracker:

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

I will answer again:

You can't run on your sample project, because it has to have these conditions:
1. Need to be on the Play Store, to allow in-app-purchases
2. Need to have subscription option
3. Need to have Admob with mediation and Unity adapter and an account there, mapped to various ads.
4. Need to be signed as release.
  • sample project that replicates the issue

  • Any of these, as it requires a published app on the Play Store that is signed as a release version:

  • Steps to reproduce the issue
    After installation, purchase a subscription. Doesn't matter which.

  • Affected device information if its happening on specific devices
    It occurs on various devices. I already showed a video of this and links on Crashlytics.
    What I have though is Pixel 6 with Android 16.

I'm not sure what you want me to send on the link, so I've sent you the APK file of the VocaLearn app.
Reply all
Reply to author
Forward
0 new messages