Ad Error: Unable to request ads from server due to network error. Browser gives CORS error with: "Origin 'null' is therefore not allowed access." BUT WORKING IN FLASH SDK !!!

3,245 views
Skip to first unread message

disp...@gmail.com

unread,
Mar 21, 2014, 10:55:55 AM3/21/14
to ima...@googlegroups.com
Everything is pretty much in the title. Here is the relevant VAST link:

http://ae.amgdgt.com/ads?t=de&p=9372&pl=teststandard&cat=sc_vast2&sz=400x320&kvp=u%3Dpub%3Dtapetv&rnd=[random]

We could figure out thanks to the dual validator (https://developers.google.com/interactive-media-ads/docs/vastinspector_dual) that this link was actually working with the Flash SDK, 
but it is not working with the HTML5 SDK. 

The error the HTML5 SDK gives is: Ad Error: Unable to request ads from server due to network error.

For us this is currently very annoying because we want to use *only* the HTML5 SDK. 

We assume that if a VAST link is working with the Flash SDK, the HTML5 SDK *should* definitely support it too (the media at the end of the link is available in WebM *and* MP4, so cross-browser compatible)

However, is there any way to possibly fix this on the ad server side too?

And also: when will it be possible to have an HTML5 SDK that integrates a "fall back" to a Flash player that integrates the Flash SDK. 

That would enable one JavaScript SDK to be working cross-browser (also on legacy browsers that do not support HTML5 video) without having the client side hassle with all that.

I'd really suggest the Google IMA team should do that. Or is there already some kind of "wrapper" project that makes the HTML5 SDK and some bare-bone integration of the Flash SDK work together?

Thanks for any quick reply, we are really looking forward to actually solve this issue, as this is an ongoing business case. 

Cheers
Stephan

disp...@gmail.com

unread,
Mar 21, 2014, 12:01:31 PM3/21/14
to ima...@googlegroups.com
Note: 

I realized now that this is not the Flash SDK but simply a "chromeless" video player that is in Flash and part of the HTML5 SDK already. That's very good. But it makes it even more mysterious why it will work with one technology and not the other, since the VAST transactions should then be done by the JavaScript (HTML5) SDK, right? 

I am currently looking into the code of the VAST validator to understand how to force the usage of the Flash player, so we can do it via Flash which is also OK for us (as long as we are not forced to use several SDKs). 

The whole part of PlayerManager etc is totally not documented, nowhere it is explained how we can control what technology is actually used. Can you explain?

Thanks a lot
Stephan

Bret McGowen

unread,
Mar 21, 2014, 5:15:33 PM3/21/14
to ima...@googlegroups.com
Hi Stephan,

As far as the Flash and HTML 5 SDKs go, they are two separate SDKs and don't interact with each other. The Video Suite Inspector page has both of them on the same page so you can more easily test VAST ad tags with the two different SDKs. But when you switch between, it's not handing off from one to the other or anything like that.

That's why you get a CORS error in HTML 5 and not in Flash, because Flash uses crossdomain.xml for security and HTML 5 uses CORS. It looks like the reason you're getting the error in HTML 5 is one of the redirects from the original ad tag doesn't have the CORS header set (https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/ads#cors). The specific URL I'm seeing that doesn't have the header set is http://ad-emea.doubleclick.net/N8549/ad/testadvertiser.smartclip/sc_vast2;dt1=;dt2=%26amgid%3ddfeb31e3-eb13-4dff-990a-cc409a2a0b7a%26;amg=;u=pub=tapetv;sz=400x320;ord=[random]? which is a 302 redirect from the original ad tag.

If you want the fallback HTML 5 to Flash behavior that you're asking about, I'd suggest taking a look at the Video Players listed on our partners page at:  http://www.google.com/doubleclick/publishers/partners/

Those have video players already integrated with the IMA SDK and some of them have the fallback ability you're asking about.

Cheers,
Bret McGowen
IMA SDK

Stephan Hesse

unread,
Mar 21, 2014, 9:31:00 PM3/21/14
to ima...@googlegroups.com
Hi Bret

Thanks a bunch for clearing up my mind on that one. I was a bit confused wether your HTML5 player now actually had a Flash option, or if you were showcasing the two different SDKs in the validator (which turned out to be the case as you explained). 

Also I could not explain to myself how CORS could work with Flash but not with HTML5. Of course the crossdomain policy file of Flash is the answer, no CORS headers needed. We will redirect this to our ad server providers so that they can fix these on their system.

Also thanks for the links. To guarantee fallback from native video playback we'll use the videojs plugin for IMA, since we already use this player anyway.

Cheers
Stephan


--
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/yFy-mqmBrLU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at http://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.

Manu Mohan T

unread,
Feb 22, 2016, 8:45:39 AM2/22/16
to Interactive Media Ads SDK
I have exactly the same issue with Video.JS IMA plugin. Any help is appreciated. I am using "https://hk-vserver-staging.azurewebsites.net/vast/campaign/WPFt_lIAXEOH2Pra-dUxaQ?" as adTagUrl. And i am getting error like
Enter code here.XMLHttpRequest cannot load http://cdn-01.yumenetworks.com/ym/72K6cH27X672/3560/fDYSCnZM/Hooked_AS3.xml. The 'Access-Control-Allow-Origin' header contains the invalid value ''. Origin 'http://imasdk.googleapis.com' is therefore not allowed access.
VM1283
:1284 AdsLoader error: AdError 301: Ad request could not be completed due to a network error.
VM1283
:20 VIDEOJS: ads adserror triggered: ads-ready? -> content-playback..

Elton Gao

unread,
Apr 12, 2018, 9:47:08 AM4/12/18
to Interactive Media Ads SDK
Hi there,
    Just want to put here that CORS config issue is causing this error on my end. By putting allow any origin to POST, it fixed the issue for me, (like in S3 bucket CORS configuration, adding ` <AllowedMethod>POST</AllowedMethod>` I assume this is due to IMS SDK wants to post to the link given.
Reply all
Reply to author
Forward
0 new messages