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.vocalearnhttps://play.google.com/store/apps/details?id=com.lb.backup_plushttps://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]