Skip to content

Next-Gen Android rewarded ads intermittently freeze or close early without reward #4273

Description

@liang530

[REQUIRED] Step 1: Describe your environment

  • Unity version: 6000.3.20f1
  • Google Mobile Ads Unity plugin version: 11.3.0
  • Plugin installation method: Unity Package Manager through OpenUPM
  • Platform: Android
  • GMA Android mode: Next-Gen
  • GMA Android Next-Gen SDK version: 1.2.1
  • Android min SDK: 25
  • Android target SDK: 36
  • ABI: arm64-v8a
  • R8/minification: Disabled for both Debug and Release builds
  • Google Play services version during testing: 26.20.31
  • Mediation networks:
    • Unity Ads SDK 4.18.0
    • Unity Ads AdMob adapter 4.18.0.0

[REQUIRED] Step 2: Describe the problem

Rewarded ads are unstable when the GMA Android Next-Gen SDK is enabled.

The issue has two observable forms:

  1. The rewarded video starts normally but freezes after playing for a few seconds. The Next-Gen AdActivity remains in the foreground and the user cannot complete the ad.
  2. The rewarded video plays for approximately 4 to 15 seconds and then closes automatically. No reward callback is fired.

The issue is intermittent but can be reproduced multiple times during a short test session on the affected device.

There is no application crash or ANR. The Unity application process remains alive and returns to the game after the ad closes.

Steps to reproduce

  1. Install Google Mobile Ads Unity plugin 11.3.0.
  2. Select the Android Next-Gen SDK in Google Mobile Ads Settings.
  3. Resolve Android dependencies and confirm that the following dependency is used:
implementation 'com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:1.2.1'
  1. Call MobileAds.Initialize() from the Unity main thread.
  2. Wait for initialization to complete.
  3. Load and show a rewarded ad using RewardedAd.Load() and RewardedAd.Show().
  4. Repeat the rewarded ad flow several times on a vivo V2352A running Android 16.
  5. Observe that some rewarded ads freeze or close before completion.

All ad loading is performed only after Mobile Ads initialization has completed.

Expected behavior

The rewarded video should play to completion.

The reward callback should fire after the user completes the rewarded ad, followed by the full-screen content closed callback.

If playback fails, the SDK should invoke OnAdFullScreenContentFailed with a documented error instead of silently closing the activity.

Actual behavior

For affected ads:

  • The Next-Gen activity starts successfully:
com.google.android.libraries.ads.mobile.sdk.common.AdActivity
  • Video playback starts and MediaCodec is initialized.
  • Playback either freezes or terminates before completion.
  • Google Ads internal logging contains the following markers:
videoplayfailed400
j_vi_fa.7440
aec=400
  • The normal reward and completion markers are absent:
No j_rwd_gr
No complete-1
No 100% video progress event
  • Android then reports that the Ads activity requested its own finish:
wm_finish_activity:
com.google.android.libraries.ads.mobile.sdk.common.AdActivity,
app-request
  • The Unity plugin receives only the close callback:
OnAdFullScreenContentClosed before reward
  • OnAdFullScreenContentFailed is not called.
  • No reward callback is called.

One failing request contained this query ID:

x-afma-gws-query-id: uRotasCoLYze29gP8rHo0Qk

Additional Android logs

MediaCodec and Qualcomm Codec2 warnings are present around the playback failure:

CCodecConfig: query failed after returning values (BAD_INDEX)
Failed to query component interface for required system resources: 6
Codec2Client: setOutputSurface -- failed to set consumer usage (6/BAD_INDEX)

These warnings may be device-specific and are not necessarily the root cause, because some of them can also appear during successful playback.

No corresponding errors were observed:

No FATAL EXCEPTION
No Java crash
No ANR
No ClassNotFoundException
No NoClassDefFoundError
No NoSuchMethodError
No VerifyError
No ads_mobile_sdk.jg1.a stack trace

This does not appear to be an R8 issue because Android minification is disabled.

Standard SDK comparison

Using the same Unity project, ad unit, application code, and device, switching only the Android SDK mode to Standard uses:

implementation 'com.google.android.gms:play-services-ads:25.4.0'

Standard mode is substantially more stable. Most rewarded ads play normally, and the frequent early automatic closure seen with Next-Gen is no longer reproducible in the same way.

There can still be an occasional playback stall on this vivo device, but its frequency is much lower than with Next-Gen.

Questions

  1. What do the internal videoplayfailed400 and aec=400 codes mean?
  2. Is this a known rewarded-video playback issue in Next-Gen SDK 1.2.1?
  3. Is there a known compatibility issue involving Android 16, vivo devices, WebView, or Qualcomm MediaCodec?
  4. Should OnAdFullScreenContentFailed be invoked in this situation instead of only the close callback?
  5. Does Next-Gen Android SDK 1.3.0 contain a fix for this issue?
  6. Is it safe to override the Unity plugin 11.3.0 dependency from Next-Gen 1.2.1 to 1.3.0, or should Unity applications remain on Standard mode until a new plugin release officially includes it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions