java.lang.IllegalStateException: Call to playAd without appropriate call to loadAd first.

19 views
Skip to first unread message

shiteng zheng

unread,
Mar 22, 2024, 5:41:14 AMMar 22
to Interactive Media Ads SDK
Hi Team Support,
Exception java.lang.IllegalStateException: Call to playAd without appropriate call to loadAd first.
  at com.google.ads.interactivemedia.v3.internal.aki.playAd (IMASDK:2)
  at com.google.ads.interactivemedia.v3.internal.ajl.f (IMASDK:6)
  at com.google.ads.interactivemedia.v3.internal.aje.r (IMASDK:3)
  at com.google.ads.interactivemedia.v3.internal.aje.k (IMASDK:115)
  at com.google.ads.interactivemedia.v3.internal.ajk.f (IMASDK:5)
  at com.google.ads.interactivemedia.v3.internal.ajh.shouldOverrideUrlLoading (IMASDK:2)
  at android.webkit.WebViewClient.shouldOverrideUrlLoading (WebViewClient.java:83)
  at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading (chromium-TrichromeWebViewGoogle6432.aab-stable-626106433:93)
  at android.os.MessageQueue.nativePollOnce
  at android.os.MessageQueue.next (MessageQueue.java:339)
  at android.os.Looper.loop (Looper.java:208)
  at android.app.ActivityThread.main (ActivityThread.java:8192)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:626)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1015)

- After receiving the AdsLoadedListener event, I called AdsManager.init().
Start playing resources when AdEvent.AdEventListener is in LOADED
- We can not reproduce in my side. it just occur after release app  on Store.
So, I don't step to reproduce this issue.
- For sample app(Android) -> can not reproduce.
- SDK: com.google.ads.interactivemedia.v3:interactivemedia:3.27.0


Could you please help me check the issue. If you need more information. Please let me know.

Thank you,
shiteng zheng

IMA SDK

unread,
Mar 22, 2024, 8:19:54 AMMar 22
to mr.sh...@gmail.com, ima...@googlegroups.com
Hi Shiteng,

Best way to solve the issue is through replication of the behavior. However, you mentioned that there is no known way to replicate the said issue. So, let me just share my thoughts based on the details you have currently shared. It seems like the issue here is you are trying to play the ad without loading the ads or requesting for the ads to be played. You may want to check our SDK Architecture for better understanding on the lifecycle of the SDK

Additionally, it would also be best to check out Get Started guide and our Android sample apps and use them as reference for your own application to avoid implementation issues.

Lastly, I also noticed that you are still using an older version of the Android SDK. We would recommend to update to the latest version (v3.32.0) to be updated on the latest features and possibly avoid other issues that have been fixed with the latest updates.
  
This message is in relation to case "ref:!00D1U01174p.!5004Q02s0A9v:ref" (ADR-00228349)

Thanks,
 
Google Logo IMA SDK Team

 

Reply all
Reply to author
Forward
0 new messages