Amphtml: amp-ad does not load doublclick enclosed in amp-experiment if amp-ad js is loaded independently.

Created on 15 Sep 2016  路  17Comments  路  Source: ampproject/amphtml

Production bug!

We noticed a warning feature_tests/spec_example.html:59:7 The tag 'amp-ad extension .js script' is missing or incorrect, but required by 'amp-ad'. This will soon be an error. (see https://www.ampproject.org/docs/reference/amp-ad.html) [DEPRECATION] and so we added amp-ad as a stand alone script. When we did so non-default doubleclick amp-ad units stopped loading (that is the units whose viewability was dependent on the amp-experiment as opposed to those that were viewable by default)

We've reverted the change so I can't give you a demo link. However this link contain the amp-experiment in question. https://wmur.relaymedia.com/amp/news/man-shot-in-manchester-dies-of-injuries/41679500

High Priority Bug caching monetization

Most helpful comment

Thanks @jpettitt. @zhouyx and I finally reproduced the issue locally and tracked down the bug.
It happens when amp-ad is executed before amp-experiment, when the ad is not visible yet. That explains why removing amp-ad script is a work around, because it delays the loading of amp-ad extension.

The issue is actually known: #4075. I'll make a fix soon. Thanks for reporting!

All 17 comments

/to @lannka @zhouyx can anyone of you look into this?

The given link consists the same problem. Anyone works on resolving the issue. Keep posted. Thanks in advance for all the good work of AMP guys 馃憤

ping @zhouyx @lannka . want to make sure somebody is already looking at this

@lannka I can't think of anything related to ad script loading. Have you have any ideas on this issue?

@jpettitt @madusankapremaratne I'm having a hard time to reproduce the issue.

I tried composing a page containing amp-ad and amp-experiment according to what @jpettitt has described.
I also tried to proxy the URL that @jpettitt has provided, and insert amp-ad extension script explicitly.

Can you confirm this is only happening and consistently happening after you add the amp-ad extension JS?

Very occasionally, I do see blank ad, with and without the amp-ad extension. I didn't look into details, as I suppose it is not related to the bug reported here.

To be able to further debug the issue, we need a reproducible demo.

We're seeing it consistently with the amp-ad extension on. Let me see if I can rig up a test config.

Well that's weird, we can't repo it now either. The original issue manifested at a dramatic loss of ad views for one side of the experiment and was correlated with our pushing the amp-ad js to production and came back when we removed the amp-ad js. We could, at the time, reproduce it 100%. Since I can't reproduce it on any of my dev configs I'm going to try re-enabling the amp-ad code in productions and see what happens. I'll let you know.

Random thought - by any chance could #4792 have fixed it?

@madusankapremaratne do you have a reproducible case for this?

We put amp-ad js back in prod and saw a huge spike in unfilled impressions. We've reverted it again. Here is what we've seen

The best repro case seems to be searching the site name and browsing the carousel. For example we just searched "kcci" and of 10 pages in the carousel the 300x250 failed to load in 7 of them. We see similar outcomes o "wmur", "wesh" etc. However this requires the bug in prod which I can't permit.

When it does fail, if I look in my chrome logs I don't see requests to https://securepubads.g.doubleclick.net/gampad/ads for the units in question (this as opposed to a regular "no fill" where that call is made and returns a no-ad message)

I'm sorry I can't leave this live for you to debug, I'll keep looking for a way to repro. W're checking with the pub to see if we can leave one site broken in prod so you can repro it.

This link will load the page with ads javascript. https://adtest-dot-relay-beta.appspot.com/amp/www.wesh.com/orlandomyway/on-the-town-orlando/ariana-grande-to-bring-dangerous-woman-tourto-orlando/41745708 current working theory is this may only happen if the page is in a viewer window.

@jpettitt thanks a lot for providing those. can you also confirm that this bug has only been seen when amp-experiment in usage?

Sounds like the conditions are: viewer + amp-ad.js + amp-experiment?

@lannka @zhouyx did you test on master or an old version?

@erwinmombay I was on master.

Yes only with amp-experiment and only the ads that are by default hidden by the CSS and exposed by the experiment fail. Failure mode is the call to pubads never happens (as opposed to calling and getting a no-ad response).

Thanks @jpettitt. @zhouyx and I finally reproduced the issue locally and tracked down the bug.
It happens when amp-ad is executed before amp-experiment, when the ad is not visible yet. That explains why removing amp-ad script is a work around, because it delays the loading of amp-ad extension.

The issue is actually known: #4075. I'll make a fix soon. Thanks for reporting!

Thanks. i was beginning to think I was going nuts. As long as it's fixed before amp-ad js become mandatory.

Fixed by #5148

Having this same issue with amp-twitter and amp-youtube

I can get my amp file to pass if i change this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrjoro picture mrjoro  路  3Comments

choumx picture choumx  路  3Comments

Download picture Download  路  3Comments

aghassemi picture aghassemi  路  3Comments

aghassemi picture aghassemi  路  3Comments