Safari: [Error] Blocked a frame with origin **** from accessing a frame with origin **** Protocols, domains, and ports must match.

15,294 views
Skip to first unread message

Arnaud Leyder

unread,
Feb 24, 2015, 9:16:34 AM2/24/15
to ima...@googlegroups.com
Hi,

I have implemented the IMA SDK with HTML5 video. Results can be seen here: https://www.radiantmediaplayer.com/video-ads.html
It works well overall with pre-roll video and even with TrueView however I am getting an error message *only* in Safari.
I am testing with Mac OS X 10.10 and Safari 8.0.2 and iOS 8 Safari on iPad and I can see this error in the log each time. You can try the above URL and see for yourself. I am using the following adTagUrl:
https://pubads.g.doubleclick.net/gampad/ads?sz=640x360&iu=/6062/iab_vast_samples/skippable&ciu_szs=300x250,728x90&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1url=[referrer_url]&correlator=[timestamp]
I have copied the console log at bottom.

It does not prevent the ad from playing in Safari as a pre-roll but I am seeing the same error message with post-roll ads on the iPad causing the player to froze at startup.
This error message can be reproduced for example on Mac OS X 10.10 Safari 8 on:
https://developers.google.com/interactive-media-ads/docs/vastinspector_dual

I guess it is some kind of Ajax/CORS restriction but I am baffled with the fact it only happens in Safari. Is it something you are aware of? Is there some kind of settings to specify for Safari?

Thanks in advance
Arnaud

[Error] Blocked a frame with origin "https://imasdk.googleapis.com" from accessing a frame with origin "https://www.radiantmediaplayer.com". Protocols, domains, and ports must match.
(fonction anonyme) (bridge3.90.2_en.html, line 143)
global code (bridge3.90.2_en.html, line 456)
[Error] Blocked a frame with origin "https://imasdk.googleapis.com" from accessing a frame with origin "https://www.radiantmediaplayer.com". Protocols, domains, and ports must match.
Js (bridge3.90.2_en.html, line 276)
uw (bridge3.90.2_en.html, line 452)
(fonction anonyme) (bridge3.90.2_en.html, line 463)
[Error] Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "https://www.radiantmediaplayer.com". Protocols, domains, and ports must match.
(fonction anonyme) (html5player.js, line 828)
global code (html5player.js, line 1675)

Arjan Haverkamp

unread,
Feb 24, 2015, 10:28:10 AM2/24/15
to ima...@googlegroups.com
I am experiencing the exact same issue, in Safari only.
Playing around with
    document.domain = '....';
seems to help a bit, but it doesn't work reliably.
I am, as you are, wondering very much why this only happens in Safari.
The site I'm working on works flawlessly on all other browsers, and the IMA video ads play on them too.

Hope there's a simple trick to fix this. If more info from my side is needed, please let me know.

Arjan

Op dinsdag 24 februari 2015 15:16:34 UTC+1 schreef Arnaud Leyder:

Shawn Busolits (IMA SDK Team)

unread,
Feb 24, 2015, 12:44:15 PM2/24/15
to ima...@googlegroups.com
Hi all,

Arnaud, can you send me a test page where you're seeing the post-roll causing the player to freeze? The ad tag you sent me is just a pre-roll.

Arjan, is this impacting ad or video playback on your page, or is it just logging an error?

Thanks,
Shawn Busolits
IMA SDK Team

Arjan Haverkamp

unread,
Feb 24, 2015, 12:46:14 PM2/24/15
to ima...@googlegroups.com
It is just logging an error, the ad plays fine.

Op dinsdag 24 februari 2015 18:44:15 UTC+1 schreef Shawn Busolits (IMA SDK Team):
Message has been deleted

Dang Tran

unread,
Jun 18, 2015, 11:50:17 AM6/18/15
to ima...@googlegroups.com
Hi Shawn,

I used the Video Suite Inspector removed some stuff from the sample adtag URL to generate an empty vast:

https://pubads.g.doubleclick.net/gampad/ads?adk=1813062453&ciu_szs

Here is my sample player with the empty adtag: http://link.brightcove.com/services/player/bcpid3974030164001?bckey=AQ~~,AAADbxBS4EE~,CXoFA7QSgynUvmSVALrYd8eW5XcL68w3&bctid=3776689465001&forceHTML=true

The error I got on Chrome:
XMLHttpRequest cannot load https://pubads.g.doubleclick.net/gampad/ads?adk=3752714195&ciu_szs&sdkv=h.3…1_is2_er291.0.448.300_sv2_sp1_vi0.0.2380.674_vp100_ct1_vb1_vl1_vr1_eb24171. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://imasdk.googleapis.com' is therefore not allowed access. The response had HTTP status code 400.

Here is the error on Safari:
[Error] Blocked a frame with origin "http://c.brightcove.com" from accessing a frame with origin "http://link.brightcove.com". The frame requesting access set "document.domain" to "brightcove.com", but the frame being accessed did not. Both must set "document.domain" to the same value to allow access.
Oe (ima3.js, line 306)
pi (ima3.js, line 360)
o (ima3.js, line 360)
He (ima3.js, line 301)
dispatchEvent (ima3.js, line 299)
m (ima3.js, line 395)
Ee (ima3.js, line 296)
Ae (ima3.js, line 297)
(anonymous function) (ima3.js, line 295)

I can reproduce this issue on the Video Suite Inspector.

Following this thread I am not sure what was the outcome also if this is in the plan to be fixed in the near future?

Thanks,

Shawn Busolits (IMA SDK Team)

unread,
Jun 18, 2015, 1:36:08 PM6/18/15
to ima...@googlegroups.com, dt...@brightcove.com
Hi Dang,

I think the problem is that your modified tag isn't returning empty VAST - it's returning an empty web page. If your tag were returning empty VAST it would led the SDK to throw an AdsLoader error. Try this tag instead: http://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/utility_samples/invalid&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&correlator=208158173

As far as your Safari error message goes, we have been seeing this with the HTML5 SDK but it hasn't been affecting ad playback. Is it affecting ad playback in your case?

Thanks,
Shawn Busolits
IMA SDK Team

Dang Tran

unread,
Jun 21, 2015, 8:11:14 PM6/21/15
to ima...@googlegroups.com, dt...@brightcove.com
Hi Shawn,

I have tested your sample tag which shows the Blocked error message in Safari.

On Chrome it shows the following:
GET https://imasdk.googleapis.com/js/core/pubads.g.doubleclick.net/gampad/ads?s…q=1&env=vp&output=xml_vast2&unviewed_position_start=1&correlator=208158173 404 (Not Found)Ss.send @ bridge3.101.2_en.html:279et @ bridge3.101.2_en.html:284(anonymous function) @ bridge3.101.2_en.html:283(anonymous function) @ bridge3.101.2_en.html:283le @ bridge3.101.2_en.html:51g.F @ bridge3.101.2_en.html:49at @ bridge3.101.2_en.html:280bt @ bridge3.101.2_en.html:283Ss.N @ bridge3.101.2_en.html:281Ss.K @ bridge3.101.2_en.html:281

I assume you are treating a bad adtag URL different to one which is actually a valid tag but empty VAST.

Can you please let me know what is the current priority on getting this fix and if you have any ETA?

As you can see this error is a widespread error. Even though it does not break playback it is still not preferred behaviour and causes red herring.

Kind regards,

Shawn Busolits (IMA SDK Team)

unread,
Jun 22, 2015, 11:09:16 AM6/22/15
to ima...@googlegroups.com, dt...@brightcove.com
Hi Dang,

Thank you for the info. We don't have a timeline on fixing this error yet. If you see it start to affect ad playback please let us know.

Thanks,
Shawn Busolits
IMA SDK Team

Steve Craig

unread,
Jul 21, 2016, 9:43:07 AM7/21/16
to Interactive Media Ads SDK, dt...@brightcove.com
Hi Shawn,

I'm getting this error in Safari 9.1 (presumably elsewhere too) with videojs-ima and it is affecting ad playback.

1. As soon as `videojs.ima.js` is loaded, we get the error:
[Error] Blocked a frame with origin "http://imasdk.googleapis.com" from accessing a frame with origin "http://xxx.xxx.xxx.xxx". Protocols, domains, and ports must match.
qA (bridge3.136.0_en.html:493:495)
vG (bridge3.136.0_en.html:744:964)
(anonymous function) (bridge3.136.0_en.html:755)

2. As soon as player.ima.startFromReadyCallback() is run (FYI - I'm not using videojs.ima's readyCallback, instead triggering player.play() post a user-gesture - I found player.ima.startFromReadyCallback() from debuging)
Ad error: AdError 1005: The provided ad type: skippablevideo is not supported. 
  videojs.ima.js:287 

Note: this works fine in Android (no AdError 1005, making me think error 2 is a red-herring being thrown because of error 1)

I tested with a version of the gold standard (just submitted PR #250): http://googleads.github.io/videojs-ima/examples/iPhone/index.html, and getting error 1 above.

Has something changed in the IMA HTML5 SDK to affect this?

Thanks,

Steve

Steve Craig

unread,
Jul 21, 2016, 9:48:18 AM7/21/16
to Interactive Media Ads SDK, dt...@brightcove.com
Sorry, description along with error 2 should read: 
2. As soon as player.play() is run (my debugging of player.ima.startFromReadyCallback() was inconclusive)

And to clarify "affecting ad playback", I mean the ad doesn't start!

Steve Craig

unread,
Jul 21, 2016, 10:08:41 AM7/21/16
to Interactive Media Ads SDK, dt...@brightcove.com
Update: with the updated http://googleads.github.io/videojs-ima/examples/iPhone/index.html, I am still getting error 1 above, but it does usually play the ad (I was testing on a VM and ad-playback was pretty inconsistent though)

Steve Craig

unread,
Jul 21, 2016, 10:26:47 AM7/21/16
to Interactive Media Ads SDK, dt...@brightcove.com
Final update: ... In my case error 1 was the red-herring. Error 2, "skippablevideo is not supported", is a legitimate error on iOS

So it would appear that [Error] Blocked a frame with origin "http://imasdk.googleapis.com" from accessing a frame with origin is not affecting my ad-playback after all.

Cristián Meléndez Sáez

unread,
Jul 21, 2016, 10:44:31 AM7/21/16
to Interactive Media Ads SDK, dt...@brightcove.com
Hi Steve.

VAST 3's skippable ads are not supported on iOS. Unfortunately there's no way to catch the error and allow content playback.

c.

Tyler Sidell (IMA SDK Team)

unread,
Jul 27, 2016, 3:44:21 PM7/27/16
to Interactive Media Ads SDK, dt...@brightcove.com
Hi Steve,

Cristián and yourself are correct that skippable ads are not supported on iPhone devices and that's why you are experiencing issues with ad playback.  I'd suggest adding additional mimeTypes to your tag in order to support use cases across all devices.

As for the error that you originally were experiencing, "Blocked a frame with origin "http://imasdk.googleapis.com" from accessing a frame with origin "http://xxx.xxx.xxx.xxx". Protocols, domains, and ports must match.", we have seen this error before and as you stated it should not affect ad playback.  The explanation of this error is a same-origin policy restriction that is disallowing one domain from accessing resources from a different domain.  It is blocking Cross-Origin Resources from being shared.  You can update your CORS headers, as outlined in our documentation, to allow cross-origin sharing.

Thanks,
Tyler Sidell
IMA SDK Team
Reply all
Reply to author
Forward
0 new messages