Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exoplayer midroll stuck when vast document is empty #3584

Closed
orhunkupeli7 opened this issue Dec 13, 2017 · 12 comments
Closed

Exoplayer midroll stuck when vast document is empty #3584

orhunkupeli7 opened this issue Dec 13, 2017 · 12 comments
Assignees
Labels

Comments

@orhunkupeli7
Copy link

orhunkupeli7 commented Dec 13, 2017

If vast document is empty player stucks.

Create an empty vast document for a midroll like:
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0"/>

Example link:
http://rmcdn.2mdn.net/MotifFiles/html/1248596/android_1330378998288.mp4

Player Version:
Version of exoplayer 2.6.0

Device: Nexus 5x API 24
Bug report:
12-13 13:57:59.772 7678-7678/com.google.android.exoplayer2.imademo W/ImaAdsLoader: onAdEvent: LOG
12-13 13:57:59.772 7678-7678/com.google.android.exoplayer2.imademo W/ImaAdsLoader: type: adLoadError
12-13 13:57:59.772 7678-7678/com.google.android.exoplayer2.imademo W/ImaAdsLoader: errorCode: 1009
12-13 13:57:59.772 7678-7678/com.google.android.exoplayer2.imademo W/ImaAdsLoader: errorMessage: The response does not contain any valid ads.
However it's an empty vast document
bugreport-NYC-2017-12-13-13-58-12.zip

@andrewlewis andrewlewis self-assigned this Dec 13, 2017
@equistar
Copy link

equistar commented Dec 29, 2017

Hi @andrewlewis , Any updates on this bug. ?

@jazimm
Copy link

jazimm commented Jan 3, 2018

I'm experiencing the same issue when the response is empty. Rather than the empty ad being skipped and content resuming the player simply hangs.

@andrewlewis
Copy link
Collaborator

A fix for this is in review at the moment. Hopefully it will be on the development branch within the next couple of weeks. Thanks for your patience.

@andrewlewis
Copy link
Collaborator

Still working on this but it's likely to take a bit longer as it requires changes to how we handle ad timeline updates.

ojw28 pushed a commit that referenced this issue Feb 1, 2018
Before this change, the ad playback state stored the number of played ads in
each ad group. There was no way to represent that an ad had failed to load (and
it wouldn't be possible just to increment the played ad count to signal a load
error because there might be an unplayed ad before the ad that failed to load).

Represent the state of each ad (unavailable, available, skipped, played, error)
in each ad group. In a later change the player will use this information to
update its loaded MediaPeriods in response to future ads failing to load.

Also make the AdPlaybackState immutable and remove copying/duplication of its
fields in the ad timeline and period.

Issue: #3584

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183655308
@wezley98
Copy link

wezley98 commented Feb 8, 2018

Hi @andrewlewis, This is blocking us from updating our current implementation to exoplayer v2 from v1, is there any update on this issue please?

@andrewlewis
Copy link
Collaborator

We plan to push an update to the development branch that should fix this later this week, or early next week. Sorry for the delay.

@andrewlewis andrewlewis reopened this Feb 8, 2018
andrewlewis added a commit that referenced this issue Feb 8, 2018
Resolve the media period for ad playback when resolving a subsequent period and
when receiving a timeline where the playing period in range (but wasn't before).

Fix the seek position calculation when a current ad must be skipped and is
followed by another ad.

Check MediaPeriodInfos match when checking MediaPeriodHolders, to handle cases
where a future ad should no longer be played. This may involve playing two
content media periods consecutively.

Issue: #3584

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184514558
andrewlewis added a commit that referenced this issue Feb 8, 2018
If IMA loads an empty VAST document for an ad group it notifies via a LOG
AdEvent. Handle the event by updating the AdPlaybackState accordingly.

The error state will be handled in ExoPlayerImplInternal in a separate change.

Issue: #3584

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184516585
@andrewlewis
Copy link
Collaborator

Please give the fix on dev-v2 a try and let me know if you see any remaining problems related to empty midrolls. Thanks!

@wezley98
Copy link

wezley98 commented Feb 9, 2018

@andrewlewis tested with the IMA demo on dev-v2 unfortunately it's not working correctly.

27.165 10548-10548/com.google.android.exoplayer2.imademo W/AdsMediaSource: Ad load error
                                                                                       java.io.IOException: Ad error: com.google.obf.gk@aba7a39
                                                                                           at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.maybeNotifyAdError(ImaAdsLoader.java:836)
                                                                                           at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.onAdError(ImaAdsLoader.java:554)
                                                                                           at com.google.obf.he.a(IMASDK:8)
                                                                                           at com.google.obf.gy.a(IMASDK:60)
                                                                                           at com.google.obf.gy.a(IMASDK:95)
                                                                                           at com.google.obf.gq.a(IMASDK:71)
                                                                                           at com.google.obf.hj.f(IMASDK:202)
                                                                                           at com.google.obf.hj.a(IMASDK:41)
                                                                                           at com.google.obf.hk.b(IMASDK:39)
                                                                                           at com.google.obf.hk$1.shouldOverrideUrlLoading(IMASDK:4)
                                                                                           at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:73)
                                                                                           at com.android.webview.chromium.Ap.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:75)
                                                                                           at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(AwContentsClient.java:15)
                                                                                           at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:160)
                                                                                           at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
                                                                                           at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:9)
                                                                                           at android.os.Handler.dispatchMessage(Handler.java:105)
                                                                                           at android.os.Looper.loop(Looper.java:164)
                                                                                           at android.app.ActivityThread.main(ActivityThread.java:6541)
                                                                                           at java.lang.reflect.Method.invoke(Native Method)
                                                                                           at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
                                                                                        Caused by: AdError [errorType: PLAY, errorCode: AdErrorCode [name: VAST_LINEAR_ASSET_MISMATCH, number: 403], message: Linear assets were found in the VAST ad response, but none of them matched the video player's capabilities.]
                                                                                           at com.google.obf.gy.a(IMASDK:94)
                                                                                           at com.google.obf.gq.a(IMASDK:71) 
                                                                                           at com.google.obf.hj.f(IMASDK:202) 
                                                                                           at com.google.obf.hj.a(IMASDK:41) 
                                                                                           at com.google.obf.hk.b(IMASDK:39) 
                                                                                           at com.google.obf.hk$1.shouldOverrideUrlLoading(IMASDK:4) 
                                                                                           at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:73) 
                                                                                           at com.android.webview.chromium.Ap.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:75) 
                                                                                           at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(AwContentsClient.java:15) 
                                                                                           at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:160) 
                                                                                           at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) 
                                                                                           at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:9) 
                                                                                           at android.os.Handler.dispatchMessage(Handler.java:105) 
                                                                                           at android.os.Looper.loop(Looper.java:164) 
                                                                                           at android.app.ActivityThread.main(ActivityThread.java:6541) 
                                                                                           at java.lang.reflect.Method.invoke(Native Method) 
                                                                                           at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
                                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 

We expect a 403 and no ad to play but the video content does not play and the player hangs. For testing you can you the following VAST tag.

https://skygo.neodatagroup.com/ad/skySport.jsp?f=preroll-clip&device=phone&params=%7B%22nlid%22%3A%221f2d25c4-23be-45c9-9332-097281b96d22%22%2C%22uid%22%3A%22%22%2C%22userType%22%3A%224%22%2C%22gender%22%3A%22%22%2C%22trialexpire%22%3A%22%22%2C%22adv%22%3A%22true%22%2C%22os%22%3A%22android%22%2C%22path%22%3A%22Calciomercato%2Fcalciomercato%22%2C%22advCategory%22%3A%22Calciomercato%22%2C%22advSportname%22%3A%22calciomercato%22%2C%22videoChannel%22%3A%22sport%22%2C%22videoSubchannel%22%3A%22calciomercato%22%2C%22videoDuration%22%3A%2242%22%2C%22videoTag%3A%22%3A%5B%22%22%2C%22%22%2C%22%22%5D%2C%22videoAdv%22%3A%221%22%7D

@andrewlewis
Copy link
Collaborator

That error is different from the empty midroll case handled here, and is tracked in #3801.

@wezley98
Copy link

wezley98 commented Feb 9, 2018

@andrewlewis Thanks, I have updated the other ticket with my example.

ojw28 pushed a commit that referenced this issue Feb 20, 2018
Resolve the media period for ad playback when resolving a subsequent period and
when receiving a timeline where the playing period in range (but wasn't before).

Fix the seek position calculation when a current ad must be skipped and is
followed by another ad.

Check MediaPeriodInfos match when checking MediaPeriodHolders, to handle cases
where a future ad should no longer be played. This may involve playing two
content media periods consecutively.

Issue: #3584

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184514558
ojw28 pushed a commit that referenced this issue Feb 20, 2018
If IMA loads an empty VAST document for an ad group it notifies via a LOG
AdEvent. Handle the event by updating the AdPlaybackState accordingly.

The error state will be handled in ExoPlayerImplInternal in a separate change.

Issue: #3584

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184516585
@fpittersacc
Copy link

fpittersacc commented Mar 23, 2018

Hi @andrewlewis, it seems this issue is still happening under some conditions: when Preroll + Midroll (or Preroll + Postroll), after the empty Preroll, when reaching the Midroll (or Postroll) it gets stuck, like paused, without any further events.

We are able to reproduce the same behavior with following steps:

  1. Replace Ad TAG on IMA Demo with
    IMA Sample Tags

VMAP Pre-, Mid-, and Post-rolls, Single Ads
https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator=

  1. Block the specific Ad requests with Charles:
    https://pubads.g.doubleclick.net/gampad/ads?slotname=

The player will correctly skip the first Ad error, but it seems is not correctly handling further Ads indexes, or maybe not correctly reporting the time to the underlying IMA library.

Let me know if you need any further information or it would be better to create a new issue.

@andrewlewis
Copy link
Collaborator

@fpittersacc Thank you for the information. Please do file a new issue and I'll investigate further.

@google google locked and limited conversation to collaborators Jun 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants