IMA ads giving crash while giving playAd(adMediaInfo) callback

108 views
Skip to first unread message

Akash Shah

unread,
Nov 4, 2024, 4:05:28 PMNov 4
to Interactive Media Ads SDK
Hi Team,

I have integrated below dependency in my android project for showing ads. 
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.34.0'

And I have implemented VideoAdPlayer interface in my code. The class which inherits this interface is written in kotlin language. 
At some instances it is crashing when SDK is giving callback playAd(adMediaInfo: AdMediaInfo) as the argument is of type non-null & SDK is passing null object. 

Kindly help me here


*************************

CONFIDENTIALITY CAUTION

This communication (including any accompanying documents) is intended only for the use of the addressee(s) and contains PRIVATE AND CONFIDENTIAL information. Unauthorized reading, dissemination, distribution or copying of this communication is prohibited. If you have received this communication in error, please notify us immediately by e-mail and promptly destroy the original communication. Please do not copy it or use it for any other purposes, or disclose its contents to any other person. Unless stated to the contrary, any opinions or comments are personal to the writer and do not represent the official view of the Company. In case where it represents our official view, it needs to be revalidated and is subject to the terms of our engagement.

Thank you for your co-operation.

*************************

IMA SDK

unread,
Nov 5, 2024, 2:55:58 AMNov 5
to ima...@googlegroups.com

Hi,

Thank you for contacting the IMA SDK Support team.

As kotlin enforces null safety, meaning if you declare a parameter as non-nullable, Kotlin will throw an exception if it receives a null value.

To troubleshoot the issue effectively, please provide a sample project that demonstrates the problem (not the apk file). This will allow us to examine the code implementation and provide a targeted solution.

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=IMA+SDK&entry.460850823=5004Q00002vGi8LQAS&entry.80707362=00274333

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

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

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGi8L:ref" (ADR-00274333)

Thanks,
 
Google Logo IMA SDK Team


 

Akash Shah

unread,
Nov 6, 2024, 2:38:49 AMNov 6
to Interactive Media Ads SDK
Hi Team,

Sample app will not help as it is not reproducible at our end. The issue is happening for one of our client. 
I am sharing crash stack trace for reference. In this " VmaxGamAdExoPlayerAdapter" implements VideoAdPlayer interface.

Fatal Exception: java.lang.NullPointerException: at com.vmax.vmaxgamvideohelper.VmaxGamAdExoPlayerAdapter.playAd(:58) at com.google.ads.interactivemedia.v3.impl.zzbl.zza(com.google.ads.interactivemedia.v3:interactivemedia@@3.35.1:9) at com.google.ads.interactivemedia.v3.impl.zzba.zza(com.google.ads.interactivemedia.v3:interactivemedia@@3.35.1:30) at com.google.ads.interactivemedia.v3.impl.zzbk.zzh(com.google.ads.interactivemedia.v3:interactivemedia@@3.35.1:7) at com.google.ads.interactivemedia.v3.impl.zzbg.onPostMessage(com.google.ads.interactivemedia.v3:interactivemedia@@3.35.1:2) at androidx.webkit.internal.WebMessageListenerAdapter.onPostMessage(WebMessageListenerAdapter.java:55) at java.lang.reflect.Method.invoke(Method.java) at org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil$InvocationHandlerWithDelegateGetter.invoke(BoundaryInterfaceReflectionUtil.java:162) at java.lang.reflect.Proxy.invoke(Proxy.java:1006) at $Proxy21.onPostMessage() at WV.YX.run(chromium-TrichromeWebViewGoogle6432.aab-stable-672305833:98) at android.os.Handler.handleCallback(Handler.java:1013) at android.os.Handler.dispatchMessage(Handler.java:101) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:328) at android.app.ActivityThread.main(ActivityThread.java:9210) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)

IMA SDK

unread,
Nov 6, 2024, 9:21:34 AMNov 6
to aka...@vserv.com, ima...@googlegroups.com
Hi Akash,

I ran the Goolge AdvancedExample with the mentioned SDK version "3.34.0" in the emulator pixel 8pro running Android 15.0 that has API 35 and the crash issue is not replicating. In order to investigate this crash issue further we would require the sample project reproducing the issue or below details to check and debug your implementation:
  • Full stack trace
  • Device type and model that crash occurs on
  • Confirm if the crash occurs in our Google AdvancedExample   
  • What is "VmaxGamAdExoPlayerAdapter"
You can provide the following details via reply privately to the author option or directly provide it to this link

IMA SDK

unread,
Nov 7, 2024, 12:56:06 PMNov 7
to aka...@vserv.com, ima...@googlegroups.com
Hi Akash,

I ran the Google AdvancedExample and found the the AdMediaInfo is a non-null object but SDK is passing a null object due to which app might be crashing.

I will check this issue with the wider team and update you accordingly.

IMA SDK

unread,
Nov 12, 2024, 8:52:13 AMNov 12
to ima...@googlegroups.com
Hi Akash,

Can you please send us the below details for further investigation:
  • Steps to reproduce the crash
  • Sample project reproducing the issue.  
This message is in relation to case "" (ADR-00274333)


Thanks,
 
Google Logo IMA SDK Team


ref:!00D1U01174p.!5004Q02vGi8L:ref
Reply all
Reply to author
Forward
0 new messages