question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting Google IMA event LOG randomly in exoplayer v2.9.6

See original GitHub issue

Hi,

[REQUIRED] Searched documentation and issues

Searched Stackoverflow and exoplayer bug reports but could not find the issue described below

[REQUIRED] Question

We are using Exoplayer v2.9.6 and Google IMA SDK which comes as part of the player. We see while playing Ads if we click the “Learn More” link multiple times, Ads gets skipped, app gets a LOG AdEvent and we see a Ad load timeout error in the logs.

In this condition sometimes we see the previous ad repeats for a few seconds before CONTENT_RESUME_REQUESTED event is triggered.

Is there anyway we can avoid this instead of passing a higher vast load timeout? Also after this error, the player view stops registering touch events

Any pointers will be greatly appreciated. Thanks in advance

Link to test content

You can reproduce the problem by checking out code from exoplayer branch https://github.com/google/ExoPlayer/tree/r2.9.6 and using the following code in /demos/ima/src/main/java/com/google/android/exoplayer2/imademo/PlayerManager.java

String adTag = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/423477888/SonyLiv/SonyLiv_Pre-Roll_Android&ciu_szs=1440x240,1440x400,1440x720&impl=s&gdfp_req=1&ad_rule=1&env=vp&output=vmap&unviewed_position_start=1&url=com.sonyliv&description_url=https://www.sonyliv.com&correlator=1234&vid=5586144157001&cmsid=2461245&cust_params=user_age%3D0%26user_gender%3D%26platform%3DAndroid%26app_ver%3D4.8.7%26user_location%3D12.965318993708232,77.70189364577689%26user_searched%3Dadaalat%2016%20sep";

   ImaSdkSettings imaSdkSettings = ImaSdkFactory.getInstance().createImaSdkSettings();
   imaSdkSettings.setDebugMode(true);
   adsLoader = new ImaAdsLoader(context, Uri.parse(adTag), imaSdkSettings);

Also add the following touch listener to PlayerView

playerView.setOnTouchListener(new View.OnTouchListener() {
     @Override
     public boolean onTouch(View view, MotionEvent motionEvent) {
       Log.e("PlayerView", "Touch event received");
       return false;
     }
   });

Steps to reproduce the problem

Once the Ad starts playing, please do the below steps repeatedly to reproduce the problem

  1. Click LearnMore link to pause the Ad playback when the browser popup is shown. Wait for few seconds to dismiss the popup [https://drive.google.com/file/d/1N0oL-7HMa-4tsuYttOLtHKvf8tUrYoKU/view?usp=sharing]
  2. Put the player to background, wait for few seconds and bring the app to foreground

What is observed:

  1. The ads are skipped randomly
  2. Sometimes the first ad randomly ends
  3. Sometimes the first ad repeat for some time before switching to content 4. Touch event stops coming after the error happens

IMA SDK Logs

Here are the IMA SDK logs:

10-02 00:29:11.935 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Destroying the ad break, 1500 10-02 00:29:12.005 1380 1380 I SDK_LOG:ima.loader.AdSourceFactory: Creating VastAdSource. 10-02 00:29:12.055 1380 1380 I SDK_LOG:VastAdSource: getNextAd, this.currentAdSource: [object Object] 10-02 00:29:12.105 1380 1380 I SDK_LOG:VastAdSource: hasMoreAds, this.ads.length: 1 , this.currentAdIndex: -1 10-02 00:29:12.105 1380 1380 I SDK_LOG:VastAdSource: getNextAd, this.currentAdSource: null 10-02 00:29:12.115 1380 1380 I SDK_LOG:VastAdSource: hasMoreAds, this.ads.length: 1 , this.currentAdIndex: -1 10-02 00:29:12.115 1380 1380 I SDK_LOG:VastAdSource: processNextAd_, currentAdIndex: 0, ads.length: 1 10-02 00:29:12.125 1380 1380 I SDK_LOG:VastAdSource: processInlineAd, successCallback with 1 ads 10-02 00:29:12.125 1380 1380 I SDK_LOG:VastAdSource: Setting fallback index to session context: 0 10-02 00:29:12.135 1380 1380 I SDK_LOG:VastAdSource: processInlineAd, successCallback with 1 ads 10-02 00:29:12.135 1380 1380 I SDK_LOG:VastAdSource: hasMoreAds, this.ads.length: 1 , this.currentAdIndex: 0 10-02 00:29:12.145 1380 1380 I SDK_LOG:VastAdSource: hasMoreAds, this.ads.length: 3 , this.currentAdIndex: 0 , this.numAdsSent: 1 10-02 00:29:12.145 1380 1380 I SDK_LOG:ima.loader.AdsLoaderImpl: dispatchAdsLoadedSdkEvent_, ads.length: 1 10-02 00:29:12.155 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Ad #1 loaded for ad break time: 0 10-02 00:29:12.165 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Requesting next ad for time: 0 10-02 00:29:12.165 1380 1380 I SDK_LOG:ima.managers.AdsManagerFactory: createAdsManagerFromAds_, adType: video 10-02 00:29:12.185 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Playing next item and waiting for time:0. 10-02 00:29:12.195 1380 1380 I SDK_LOG:ima.loader.SequentialAdsLoader: Starting request from queue. 10-02 00:29:12.235 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : show_ad 10-02 00:29:13.245 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event impression 10-02 00:29:13.415 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : impression 10-02 00:29:13.425 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event creativeView 10-02 00:29:13.435 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : creativeView 10-02 00:29:13.445 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event start 10-02 00:29:13.455 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event measurable_impression 10-02 00:29:13.465 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : measurable_impression 10-02 00:29:13.465 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : start 10-02 00:29:13.475 1380 1380 I SDK_LOG:ima.managers.AdsManagerFactory: createAdsManagerFromAds_, adType: video 10-02 00:29:13.945 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Destroying the ad break, 1800 10-02 00:29:15.665 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event viewable_impression 10-02 00:29:15.715 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : viewable_impression 10-02 00:29:15.945 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Destroying the ad break, 2100 10-02 00:29:16.415 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event learnMoreClicked 10-02 00:29:16.435 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : click 10-02 00:29:16.535 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event pause 10-02 00:29:16.535 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : pause 10-02 00:29:17.935 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Destroying the ad break, 2400 10-02 00:29:19.935 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Destroying the ad break, -1 10-02 00:29:20.105 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event resume 10-02 00:29:20.155 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : resume 10-02 00:29:24.275 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event learnMoreClicked 10-02 00:29:24.285 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : click 10-02 00:29:24.335 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event pause 10-02 00:29:24.405 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : pause 10-02 00:29:28.305 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event resume 10-02 00:29:28.365 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : resume 10-02 00:29:32.285 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event pause 10-02 00:29:33.935 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : pause 10-02 00:29:36.235 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event resume 10-02 00:29:36.375 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : resume 10-02 00:29:38.575 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event firstQuartile 10-02 00:29:38.665 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : firstQuartile 10-02 00:29:40.235 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event fully_viewable_audible_half_duration_impression 10-02 00:29:40.295 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : fully_viewable_audible_half_duration_impression 10-02 00:29:40.655 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event learnMoreClicked 10-02 00:29:40.675 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : click 10-02 00:29:40.685 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event pause 10-02 00:29:40.775 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : pause 10-02 00:29:44.985 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event resume 10-02 00:29:44.995 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : resume 10-02 00:29:51.835 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event midpoint 10-02 00:29:51.905 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : midpoint 10-02 00:29:52.925 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event mediaLoadTimeout 10-02 00:29:53.005 1380 1380 I SDK_LOG:ima.managers.VastVideoAdsManager: Playback error: [object Object] AdError 402: VAST media file loading reached a timeout of 8 seconds. 10-02 00:29:53.035 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : error 10-02 00:29:53.055 1380 1380 W SDK_LOG:ima.common.ErrorUtils: Error play dispatched: AdError 402: VAST media file loading reached a timeout of 8 seconds. 10-02 00:29:53.055 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Ad play error for playTime:0, error: AdError 402: VAST media file loading reached a timeout of 8 seconds. 10-02 00:29:53.065 1380 1380 W SDK_LOG:ima.common.ErrorUtils: Error log dispatched: AdError 402: VAST media file loading reached a timeout of 8 seconds. 10-02 00:29:53.075 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Playing next item and waiting for time:0. 10-02 00:29:53.145 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : show_ad 10-02 00:29:53.205 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event pause 10-02 00:29:53.205 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : pause 10-02 00:29:53.215 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event resume 10-02 00:29:53.225 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : resume 10-02 00:29:55.085 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event pause 10-02 00:29:56.945 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : pause 10-02 00:29:58.265 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event resume 10-02 00:29:58.325 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : resume 10-02 00:30:06.135 1380 1380 I SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event mediaLoadTimeout 10-02 00:30:06.175 1380 1380 I SDK_LOG:ima.managers.VastVideoAdsManager: Playback error: [object Object] AdError 402: VAST media file loading reached a timeout of 8 seconds. 10-02 00:30:06.185 1380 1380 I SDK_LOG:UrlReporter: Reporting urls for event : error 10-02 00:30:06.195 1380 1380 I SDK_LOG:UrlMacrosReplacer: No macro definition found for: CONTENTPLAYHEAD 10-02 00:30:06.205 1380 1380 W SDK_LOG:ima.common.ErrorUtils: Error play dispatched: AdError 402: VAST media file loading reached a timeout of 8 seconds. 10-02 00:30:06.215 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Ad play error for playTime:0, error: AdError 402: VAST media file loading reached a timeout of 8 seconds. 10-02 00:30:06.225 1380 1380 W SDK_LOG:ima.common.ErrorUtils: Error log dispatched: AdError 402: VAST media file loading reached a timeout of 8 seconds. 10-02 00:30:06.235 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Playing next item and waiting for time:0. 10-02 00:30:06.235 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Done playing all ads for time: 0 10-02 00:30:06.255 1380 1380 I SDK_LOG:ima.adslist.AdBreak: Destroying the ad break, 0 10-02 00:30:06.275 1380 1380 I SDK_LOG:ima.managers.AdsListAdsManager: No next event in the event queue.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

RELEASENOTES.md · mirrors_hanihashemi/ExoPlayer - Gitee
Fix playback of some invalid but playable MP4 streams by replacing assertions with logged warnings in sample table parsing code (#5162).
Read more >
Adaptive Media Player (AMP) for Devices - Premier : Android
The Akamai Adaptive Media Player (AMP) is designed to empower content providers to simplify their player operations while ensuring quality online media ...
Read more >
Exploring Means to Facilitate Software Debugging
This tool generates pseudo- random streams of user events such as clicks, touches, or gestures, as well as a num- ber of system-level...
Read more >
lake的资料loopback4访问data - CSDN
For Windows VS Linux Docker environment. Docker Windows Boot2Docker/(Docker Virtual Machine for Windows)SSH login and run basic DockerImage like ...
Read more >
ListadoCompleto Sept-Oct'18 - Ingebook
Chapter 1: Getting started with .NET Framework Chapter 2: Collections Chapter 3: XmlSerializer. Chapter 4: HTTP clients. Chapter 5: Exceptions
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found