amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Amp Ad Fast Fetch ad request sent for display:none slots

Open keithwrightbos opened this issue 9 years ago • 1 comments

Short description of your issue:

amp-ad elements using fast fetch with display:none (or otherwise size 0x0) are sending ad request because onLayoutMeasure executes. This does not occur for Delayed Fetch as it appears that layoutCallback never executes however Fast Fetch sends the request via onLayoutMeasure which has no such check. The result is that AdSense/Doubleclick requests are sent with a slot size of 0x0 which is considered invalid by the ad server returning a 400 w/o an access control header.

How do we reproduce the issue?

Create amp-ad element with type adsense, valid client, and display:none style. Load page with exp=a4a:-1 to force Fast Fetch

What browsers are affected?

All

Which AMP version is affected?

All

keithwrightbos avatar Feb 10 '17 23:02 keithwrightbos

Resolved by #7498

keithwrightbos avatar Feb 21 '17 03:02 keithwrightbos