IMA SDK (Android) Invalid Ad Type

696 views
Skip to first unread message

in...@angusyip.com

unread,
Sep 27, 2016, 4:30:09 AM9/27/16
to Interactive Media Ads SDK
Hi There, 

I have implemented my DFP tag into the Sample Android Application provided here (The Basic Example) with SDK version 3.4.0.

Basically, the issue was occurred due to the invalid ad type. It runs okay on HTML / Flash Video Suite Inspector, but not Android IMA SDK. It runs fine with the IMA sample tag. 

You should be able to reproduce the issue with below ad tag - 

https://pubads.g.doubleclick.net/gampad/ads?sz=1280x720&iu=/85256605/android-ma&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=

Here is the logcat that I receive - 
09-27 01:26:32.631 31163-31163/com.google.ads.interactivemedia.v3.samples.videoplayerapp W/IMASDK: Invalid internal message, ignoring. Please make sure the Google IMA SDK library is up to date. Message: gmsg://afma.google.com/activityMonitor?type=getPageSignals&sid=251c43c9-ddde-47ab-9992-6228bda89daa&dt=1474964792627
09-27 01:26:32.636 31163-31163/com.google.ads.interactivemedia.v3.samples.videoplayerapp E/ImaExample: Ad Error: Invalid ad type loaded.
 

Is there something wrong with the ad tag from DFP?  

Vu Chau (IMA SDK Team)

unread,
Sep 27, 2016, 11:37:19 AM9/27/16
to Interactive Media Ads SDK
Hello,

I tested your tag in the AdvancedExample and was able to get an ad.  Testing in the BasicExample shows the tag is returning empty VAST after the wrapper tag is requested.  

Do you have another tag (or more preferably, the VAST response) that I can use?

Thanks,

Vu Chau
Mobile Ads SDK Team

Angus Yip

unread,
Sep 27, 2016, 1:16:14 PM9/27/16
to ima...@googlegroups.com
Hi Vu, 

Thank you very much. How will I be able to get the VAST response for you when I get this error on Android Studio? 

I am using the device - LGE LG-D851 , Android 6.0 

Could you try this tag - 

--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ima-sdk/DeWUlBsuY6I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ima-sdk+unsubscribe@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.

Vu Chau (IMA SDK Team)

unread,
Sep 27, 2016, 2:24:42 PM9/27/16
to Interactive Media Ads SDK
Hi Angus,

Thanks for sending over the new tag, but I'm still able to get ads back for my requests (Nexus 6P, Android 7).  How often are you seeing the "invalid ad type" error?  If you can reproduce the issue locally, you should be able to capture the exact VAST response that triggers it.  You would need to middle-man your network traffic, using tools like Charles.

Vu Chau
IMA SDK Team
To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.

in...@angusyip.com

unread,
Sep 27, 2016, 4:29:49 PM9/27/16
to Interactive Media Ads SDK
Hi Vu, 

I am getting the invalid ad type error at all times on the LG device. 

I have attached the file from Charles session. 

Thanks,
ads-1

Vu Chau (IMA SDK Team)

unread,
Sep 27, 2016, 4:46:12 PM9/27/16
to Interactive Media Ads SDK
Hi Angus,

I think we have now found the cause.

If you follow your VAST wrappers, you will arrive at https://fw.adsafeprotected.com/vast/fwjsvid/st/63613/10706636/skeleton.js?originalVast=https://ad.doubleclick.net/ddm/pfadx/N7217.1884668CADREON-DOUBLECLICK/B10285982.137643883;dc_vpaid=0;sz=0x0;ord=${CACHEBUSTER};dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;dcmt=text/xml;dc_vast=3.

Notice that the mediafiles available there are all VPAIDs, which are not supported (hence "invalid ad type") on native mobile (Android/iOS).  Check our compatibility page for more information.

Going forward, if you know you are going to serve to native mobile platforms, then I recommend not including VPAID creatives when you generate your tags.

Vu Chau
IMA SDK Team

Angus Yip

unread,
Sep 27, 2016, 4:56:20 PM9/27/16
to ima...@googlegroups.com
Thank you so much for digging out the cause! 

As I do not see there is any ways to only request non-VPAID media files on DFP dashboard, would that be a chance we could have a workaround while setting up the IMA SDK? 

Thanks,

To unsubscribe from this group and all its topics, send an email to ima-sdk+unsubscribe@googlegroups.com.

Vu Chau (IMA SDK Team)

unread,
Sep 27, 2016, 5:17:28 PM9/27/16
to Interactive Media Ads SDK
Hi Angus,

There are several ways to go about this:
  • You can first detect if the requesting agent is desktop HTML5/Flash or native mobile OS.  If the latter, you can prioritize non-VPAID mime types via setMimeTypes().
  • Working from the other end of the spectrum, you can use getContentType() to get the ad type.  If the ad is a JS VPAID, it'll output "application/javascript", and so forth, and you can choose not to play the ad.  I'd query for the content type under the LOADED event, since STARTED already means ad playback.
Vu Chau
IMA SDK Team
Reply all
Reply to author
Forward
0 new messages