amphtml: Doubleclick served a4a ads do not work when loaded in a PWA with shadowdom
What’s the issue?
When loading an AMP document into a shadowdoc as part of PWA, should the document contain an amp-ad
of type “doubleclick” which loads an amp4ads based ad, the ad fails to load due to numerous errors related to No ampdoc found for [object HTMLHtmlElement]
.
How do we reproduce the issue?
A demo is available here: https://d1kvlucx6m02nr.cloudfront.net/
Upon first ( uncached ) load the ad loads correctly as the document is yet to be loaded within the shell container.
However as soon as navigation occurs & the shell container is used the ad fail to load.
- Navigate to https://d1kvlucx6m02nr.cloudfront.net/
- Click on “Article 1”
What browsers are affected?
All browsers
Which AMP version is affected?
HTML shadows – Version 1910071803120
Based on previous issues related to PWA, shadowdoc & Doubleclick it looks like there may have a been a regression.
Additionally the a4a ad example loaded via projects example of a PWA is also broken. http://localhost:8000/pwa/
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (10 by maintainers)
@calebcordry, @dvoytenko just wanted to say thanks for getting this resolved so quickly. I verified again today following the prod release.
@calebcordry I had chance to pull down your branch. It looks like the change your proposing in #25321 resolves the issue which is great news.