krux / postscribe

Asynchronously write javascript, even with document.write.
MIT License
986 stars 157 forks source link

Postscribe fails to catch errors, prevents additional loading #19

Closed PMcFad closed 11 years ago

PMcFad commented 11 years ago

When loading the ad, I can see the following error in the console:

The issue looks similar to #15, but with the latest version the error persists. The ad seems to load properly in most browsers, but unfortunately in IE8, it seems to prevent further calls from running. I've created a plunker that recreates the issue, and I can see the error in the console using chrome.

http://plnkr.co/edit/w0swNcqnILCllSOLv4Mo?p=preview

dbrans commented 11 years ago

Hi Paul, The full plnkr interface does not seem to support IE8. This link is just the "raw" result of your plunk: http://run.plnkr.co/plunks/w0swNcqnILCllSOLv4Mo/

When I look at this in IE8 I see an ad and I see the console log "postscribe done". Should I be seeing something else? Derek

On Fri, May 17, 2013 at 10:10 AM, Paul McFadden notifications@github.comwrote:

When loading the ad, I can see the following error in the console:

  • Unsafe JavaScript attempt to access frame with URL

The issue looks similar to #15https://github.com/krux/postscribe/issues/15, but with the latest version the error persists. The ad seems to load properly in most browsers, but unfortunately in IE8, it seems to prevent further calls from running. I've created a plunker that recreates the issue, and I can see the error in the console using chrome.

http://plnkr.co/edit/w0swNcqnILCllSOLv4Mo?p=preview

— Reply to this email directly or view it on GitHubhttps://github.com/krux/postscribe/issues/19 .

PMcFad commented 11 years ago

From what I can tell, IE8 renders the plunk OK. But on the actual page there is additional Javascript running as well that is making an ajax call internal to our servers, and the ads stop loading. All of the other JS completes, except for the ads.

I have updated the plunk http://plnkr.co/edit/w0swNcqnILCllSOLv4Mo?p=preview to call the 3 ads that are used on the page. When I run it in chrome, I can see the error in the console. It's not always there, sometimes I have to refresh. A screenshot is attached below. These are the only ads that seem to return this error result. Chrome and most other browsers simply seem to ignore it, but it seems IE8 is having trouble with it.

My ad team tells me that this ad has InRed tags in it. Sorry, I'm not familiar with what that is, but it seems to be the only type of ad that has this problem.

chromeconsoleerror

dbrans commented 11 years ago

Hi Paul, I'm not seeing any issue with rendering these ads in IE8 on the raw plnkr. I've refreshed a dozen times and each time I see 3 "Postscribe done - No error" messages for the 3 ads on the page.

http://run.plnkr.co/plunks/w0swNcqnILCllSOLv4Mo/

The "unsafe JavaScript attempt" do not affect postscribe.

There may be an issue with an ad in particular in IE8. If so, when the ad breaks you'll want to have your IE8 debugger open and get the 3 js responses from the 3 doubleclick calls and paste them into static js files in the plnkr (ad1.js, ad2.js, ad3.js). From there you'll want to modify the plunk to write the static script tags instead of the dynamic call to doubleclick.

postscribe('#ad1', '<script src="ad1.js"><\/script>');

etc...

Debugging ads is not easy.

PMcFad commented 11 years ago

Thanks for your help. Doubleclick support for publishers by Google originally called out the loading javascript as a problem. After some more testing, I was able to capture the the console error was coming from the ad itself.

Thanks for your help!