Skip to content

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

@keithwrightbos

Description

@keithwrightbos

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions