ImaAdsLoader getting stuck when AdsManager trigger event CONTENT_RESUME_REQUESTED
I'm trying to play ads using ImaAdsLoader with this url of ad
https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/95250053/VIDIO_ANDROID_INSTREAM&impl=s&gdfp_req=1&env=vp&output=vmap&ad_rule=1&cmsid=2511393&vid=1847420&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[timestamp]&cust_params=
but exo player getting stuck when try to play it.
Issue :
AdEventListener from ImaAdsLoader event emitted order :
CONTENT_RESUME_REQUESTED ALL_ADS_COMPLETED
but seems like the content does not playing after event triggers
after doing some debugging, found that inside https://github.com/google/ExoPlayer/blob/33938c05b5050057f4bf865cf8e1f76207f56232/extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java#L1205
the imaAdState is still 0 (IMA_AD_STATE_NONE) and
adGroupIndex still -1 (C.INDEX_UNSET)
this cause ImaAdsLoader does not taking any action to notify player,
and player still stuck at loading/buffering/blank screen
any suggestion? or improvement in near future to prevent this issue?
We are also experiencing the same issue now. We actually didn't have this issue until the day before yesterday.
I found it happens when ad tag url return VMAP and the preroll link returns the empty VAST. It doesn't happens when ad tag url return the empty VAST directly.
It doesn't happen if I modify native_bridge_en.js version by using a local proxy. https://imasdk.googleapis.com/native/core/3.183.1/native_bridge__en.js ↓ https://imasdk.googleapis.com/native/core/3.181.0/native_bridge__en.js
I guess native_bridge__en.js has something wrong since version 3.182.0
By the way, I couldn't reproduce it using IMA SDK for Android advance sample app. https://groups.google.com/forum/?hl=en-gb#!topic/ima-sdk/O6WgADh_GAE
Hi, I had the same issue.
We have been using vmap with empty vast tags and it had been working fine. However, tomorrow morning suddenly player got stuck in buffering when vmap has an empty pre-roll vast tag.
I'm so confused because I did not change either the version of Ima-SDK or ExoPlayer.
I believe that the IMA-SDK changed the behavior of js that would be loaded in WebView in a way that it affects the ima sdk behavior which is already released and used in exoplayer ima extension, and it broke Ima-extension of ExoPlayer.
Here is differences of behavior between 3.181.0 and 3.182.0(and above).
- 3.181.0
- ImaAdsLoader receives AdEvent(LOG) AdEvent: {type=adLoadError, errorCode=1009, errorMessage=The response does not contain any valid ads.} This line seems to resume content.
- ImaAdsLoader receives AdEvent(CONTENT_RESUME_REQUESTED)
- 3.182.0(and above)
- ImaAdsLoader just receives AdEvent(CONTENT_RESUME_REQUESTED)
Because
adGroupIndex == C.INDEX_UNSET, this line doesn't resume content.
In IMA SDK for Android advance sample app, this line resumes content, no matter whether it receives AdEvent(LOG, type=adLoadError) or not.
Thanks for reporting this.
I have filed an internal issue for the IMA SDK team to investigate and hopefully roll back the behavior change [Internal: b/145784163]. I am also going to see if there are any workarounds we can do on the ExoPlayer side.
Thank you! That will be very helpful to us.
I also found that it doesn't receive any AdEvents but a AdError when the ad tag url returns the empty VAST directly.
Thank you @andrewlewis ,
also @thmatuza for providing detail information about the js files
looking forward for the updates if any.
In 3.181.0 [what happens before yesterday] AdEvent -> Loaded is trigger when VMAP response is received by IMA SDK where adGroupIndex is updated. 3.182.0(and above) [what happens from yesterday] No Ad Loaded event is called It directly call CONTENT_RESUME_REQUESTED when VAST blank response is received so adGroupIndex is unset thats why exo-ima extenstion not playing the content.
If IMA SDK team start sending this event It can be Solved!
3.183.2 has been deployed to production, which should resolve this issue.
It looks fine to me now. Thank you for your prompt action!