[REQUIRED] Step 1: Describe your environment
- Unity version: 6000.0.75f1
- Google Mobile Ads Unity plugin version: 11.2.0 (regression)
- Last known working version: 11.1.0
- Plugin installation method: UPM
- GMA Android SDK architecture: Next-Gen SDK (enabled)
- Platform: Android
- Scripting backend: IL2CPP, arm64-v8a
- Affected OS / devices (production):
- Android 13 - Samsung SM-A715F
- Android 15 - Xiaomi 23073RPBFG
- Android 16 - Xiaomi 24090RA29G
- Mediation adapters: AppLovin 8.7.3, ironSource 4.5.1, Unity Ads 3.18.0, DT Exchange 3.5.8
[REQUIRED] Step 2: Describe the problem
Regression introduced in 11.2.0. The exact same app - same Next-Gen setting,
same mediation adapters, no changes to our ad code - ran fine on 11.1.0 and
started crashing in production immediately after upgrading to 11.2.0.
The crash is a fatal NPE inside androidx.webkit, in the WebView prefetch
callback path (PrefetchOperationCallbackAdapter$1.onSuccess), dispatched via
the chromium boundary-interface reflection proxy on a System WebView thread.
It happens on cold start, during the ad init/load window.
Suspected root cause: the 11.2.0 changelog adds
next_gen_resolution_strategy.gradle to "use lower webkit and
error_prone_annotation library to support older Unity Editors." This lowers the
androidx.webkit version. The crash is precisely in androidx.webkit's
PrefetchOperationCallbackAdapter.onSuccess, an API that is recent and still
being stabilized upstream. The lowered webkit version pulled in by 11.2.0 appears
to trigger this NPE, which did not occur with the webkit version resolved by 11.1.0.
Deobfuscated stack trace
Exception java.lang.Error:
at androidx.webkit.internal.PrefetchOperationCallbackAdapter$1.onSuccess (PrefetchOperationCallbackAdapter.java:46)
at java.lang.reflect.Method.invoke
at org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil$InvocationHandlerWithDelegateGetter.invoke (BoundaryInterfaceReflectionUtil.java:203)
at java.lang.reflect.Proxy.invoke (Proxy.java:1006)
at $Proxy28.onSuccess (Unknown Source)
at WV.r22.run (chromium-SystemWebViewGoogle6432.aab-stable-777817803:37)
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)
Steps to reproduce
- Plugin 11.2.0, Next-Gen GMA Android SDK enabled, mediation configured.
- Cold start the app; ad initialization / loading begins.
- Crash on a WebView thread in
PrefetchOperationCallbackAdapter.onSuccess.
Production-only, not deterministically reproducible.
What we'd like
- Restore the
androidx.webkit version used by 11.1.0, or
- Make
next_gen_resolution_strategy.gradle opt-in / not force a lower webkit for
projects that don't need older-Editor support, since the lowered version
introduces this crash.
Notes
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Regression introduced in 11.2.0. The exact same app - same Next-Gen setting,
same mediation adapters, no changes to our ad code - ran fine on 11.1.0 and
started crashing in production immediately after upgrading to 11.2.0.
The crash is a fatal NPE inside
androidx.webkit, in the WebView prefetchcallback path (
PrefetchOperationCallbackAdapter$1.onSuccess), dispatched viathe chromium boundary-interface reflection proxy on a System WebView thread.
It happens on cold start, during the ad init/load window.
Suspected root cause: the 11.2.0 changelog adds
next_gen_resolution_strategy.gradleto "use lower webkit anderror_prone_annotation library to support older Unity Editors." This lowers the
androidx.webkitversion. The crash is precisely inandroidx.webkit'sPrefetchOperationCallbackAdapter.onSuccess, an API that is recent and stillbeing stabilized upstream. The lowered webkit version pulled in by 11.2.0 appears
to trigger this NPE, which did not occur with the webkit version resolved by 11.1.0.
Deobfuscated stack trace
Steps to reproduce
PrefetchOperationCallbackAdapter.onSuccess.Production-only, not deterministically reproducible.
What we'd like
androidx.webkitversion used by 11.1.0, ornext_gen_resolution_strategy.gradleopt-in / not force a lower webkit forprojects that don't need older-Editor support, since the lowered version
introduces this crash.
Notes
in
...webview.ai.onDrawon the standard SDK; ours is a fatal NPE on a WebViewworker thread in
androidx.webkitprefetch on Next-Gen).