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

Unable to play AdTag #4297

Closed
jkellysbgtv opened this issue May 24, 2018 · 4 comments
Closed

Unable to play AdTag #4297

jkellysbgtv opened this issue May 24, 2018 · 4 comments
Assignees
Labels

Comments

@jkellysbgtv
Copy link

Issue description

Ad tag url never plays, throws NPE from player. This ad works fine in the VAST inspector and works in older versions of exoplayer with IMA extension (2.5.2).

Reproduction steps

Use test content link below in Exoplayer IMA demo.

Link to test content

https://a.teads.tv/vast/backfill/86147?userAgent=[USERAGENT]&playerWidth=[WIDTH]&playerHeight=[HEIGHT]&userId=[DEVICEID]&appId=[BUNDLE]&appName=[APPNAME]&appStoreUrl=[APPSTOREURL]

Version of ExoPlayer being used

2.8.1

Device(s) and version(s) of Android being used

Emulator nexus 5 api 26 Android 8.0.0, various others.

A full bug report captured from the device

bugreport-sdk_gphone_x86-OSR1.170720.005-2018-05-24-15-53-36.zip

@andrewlewis andrewlewis self-assigned this May 25, 2018
@andrewlewis
Copy link
Collaborator

I can't reproduce this in the main demo app or the IMA demo app. The logging from the attached bug report shows this is actually using 2.7.3: ExoPlayerImpl: Init 9c5c831 [ExoPlayerLib/2.7.3] [generic_x86, Android SDK built for x86, Google, 26] not 2.8.1, and the line numbers in PlayerManager.java look wrong -- have you made any changes to this file?

Stack trace
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: java.lang.NullPointerException
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.util.Assertions.checkNotNull(Assertions.java:107)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.source.MediaSourceEventListener$EventDispatcher.<init>(MediaSourceEventListener.java:228)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.source.MediaSourceEventListener$EventDispatcher.<init>(MediaSourceEventListener.java:221)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.source.ExtractorMediaSource.<init>(ExtractorMediaSource.java:321)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.source.ExtractorMediaSource.<init>(ExtractorMediaSource.java:47)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.source.ExtractorMediaSource$Factory.createMediaSource(ExtractorMediaSource.java:217)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.imademo.PlayerManager.buildMediaSource(PlayerManager.java:214)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.imademo.PlayerManager.createMediaSource(PlayerManager.java:185)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.source.ads.AdsMediaSource.createPeriod(AdsMediaSource.java:230)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.MediaPeriodHolder.<init>(MediaPeriodHolder.java:82)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.MediaPeriodQueue.enqueueNextMediaPeriod(MediaPeriodQueue.java:152)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.ExoPlayerImplInternal.maybeUpdateLoadingPeriod(ExoPlayerImplInternal.java:1486)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.ExoPlayerImplInternal.updatePeriods(ExoPlayerImplInternal.java:1365)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:499)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:305)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at android.os.Handler.dispatchMessage(Handler.java:101)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at android.os.Looper.loop(Looper.java:164)
05-24 15:52:33.108 10098  2679  2839 E ExoPlayerImplInternal: 	at android.os.HandlerThread.run(HandlerThread.java:65)

@jkellysbgtv
Copy link
Author

Yes, I added an EventListener in PlayerManager.java to log errors when I was attempting to solve this issue myself. Interesting that it's an older version of the player, as I just pulled down the Exoplayer repo fresh to write this ticket.

I pulled the repo again and the only change I have made is to change the adTagUrl in the strings.xml to the test content I posted. The ad is still not playing in this case, it skips straight to the content video. You said you can't reproduce this error, does that mean you are able to view the Ad?

@andrewlewis
Copy link
Collaborator

I tried to reproduce this again. I don't see a NullPointerException as reported here, but I do see that the ad media won't load, as none of ExoPlayer's extractors support it.

This is a regression from 2.5.3: since that release we started advertising support for video/mpeg streams to IMA, yet the URI we get from this ad tag can't be handled by any of ExoPlayer's extractors. If I remove that MIME type here, IMA loads an MP4 instead and the ad plays.

I'll remove this MIME type from our list of supported types (going on the assumption that the media is valid).

@jkellysbgtv
Copy link
Author

Thanks for looking into this, appreciate the help :)

ojw28 pushed a commit that referenced this issue Jun 5, 2018
Issue: #4297

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198536888
@ojw28 ojw28 closed this as completed Jun 5, 2018
ojw28 pushed a commit that referenced this issue Jun 5, 2018
Issue: #4297

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198536888
@google google locked and limited conversation to collaborators Nov 23, 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

3 participants