Skip to content

Next-Gen Android banner appears after calling Destroy() #4287

Description

@desouse

[REQUIRED] Step 1: Describe your environment

  • Unity version: 6000.0.58f2
  • Google Mobile Ads Unity plugin version: 11.3.0
  • Plugin installation method: Unity package manager
  • Platform: Android
  • Platform OS version: Android 11
  • Any specific devices issue occurs on: No
  • Mediation ad networks used, and their versions: No

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

  1. Call _bannerView.LoadAd(adRequest);
  2. Not waitnig till actual loading call _bannerView.Destroy();

Actual behaviour:

  1. The banner appears and it's impossible to hide or destroy it
  2. An exception appears

Relevant Code:

E	Unity	NullReferenceException: Object reference not set to an instance of an object.
E	Unity	  at GoogleMobileAds.Sample.BannerViewController.<ListenToAdEvents>b__9_0 () [0x00000] in <00000000000000000000000000000000>:0
E	Unity	  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0
E	Unity	  at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0
E	Unity	  at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.IntPtr javaArgs) [0x00000] in <00000000000000000000000000000000>:0
E	Unity	  at UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, System.IntPtr jmethodName, System.IntPtr jargs) [0x00000] in <00000000000000000000000000000000>:0
E	Unity	Rethrow as TargetInvocationException: GoogleMobileAds.Android.NextGenBanner

Image

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