question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🌸 Cherry-pick request for #37484 into #37411

See original GitHub issue

Issue (P0 Bug)

37484

Pull Request(s)

37483

Release Tracker(s)

37411

Channels

Stable, ~LTS~

Formats

Ads

Justification

As described in the issue 37484, the regression of the <amp-ad> extension from Smart Adserver prevents any ad call to be sent by the AMP inventory of Smart’s customers. The monetization of their AMP inventory is down to 0.

The fix has been pushed in 37483 where you can see the change is related to how the <amp-ad> tag gets access to the domain of the page.

The change has flown into Stable and is about to reach LTS version. Hence, we kindly ask this cherry-pick for an urgent fix of the Stable and LTS versions (so that publishers who rollbacked on LTS version benefit from the fix as well).

❓ In order to give some visibility to our customers, would you be able to tell us if the request can be accepted or not ASAP? Thank you very much. Please find below additional details.

Verification Steps

In the file below we reproduced the situation where an AMP page “cached_page.html” is executed in a Google Cache frame (index.html). If you browse index.html on localhost:8080 domain, you will get the error with the Stable version Error: Blocked a frame with origin "http://127.0.0.1:8080" from accessing a cross-origin frame at amp-ad-network-smartadserver-impl-0.1.js:1:185883

AMP_cache.zip

Summary

Bug: no ad call are triggered from the <amp-ad> extension of Smart Adserver Cause: the code tries to access this.win.top.location.hostname to add the page domain in the ad request. Solution: the code now uses Services.documentInfoForDoc(this.element).canonicalUrl.

Todo: As the issue did not appear during our test phase, but only when the AMP page is executed in Google Cache for AMP, it might be interesting to know how we could reproduce this kind of integration on our local test page (or in a kind of Google Cache sandbox).

Impact

All users from Smart Adserver customers are affected, for all OS and all devices when they browse an AMP page through Google Cache domain. No ad call is sent, hence there is no advertising monetization for the publisher.

Action Items

I think the main step we missed is the testing with a replica of the Google Cache for AMP integration.

Notifications

/cc @ampproject/release-on-duty @ampproject/wg-approvers @ampproject/cherry-pick-approvers /cc helpful folks from Slack channel @powerivq @erwinmombay @kristoferbaxter @calebcordry 🙏

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mlapeyre3commented, Jan 27, 2022

Hello @newmuis, @rsimha, Thank you guys and sorry for the mess.

I tested the stable branch on my test page which reproduces a “Google AMP Cache powered” page and I see the bug is no longer there (ou <amp-ad> tag sends ad requests) image

I also checked on a customer’s page in production. It uses the stable version as well and now generates ad requests 💪 image

PS: do you know how I could “force” or at least accurately reproduce using the Google AMP cache on my test pages? Or I need to publish a fully valid AMP page on production and wait for the bot to crawl my page?

Thanks!

0reactions
newmuiscommented, Jan 26, 2022

This cherrypick has made it to beta/experimental and stable.

@mlapeyre3 can you help verify that the bug is no longer reproducible?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git Cherry Pick | Atlassian Git Tutorial
git cherry-pick is a powerful command that enables arbitrary Git commits to be picked by reference and appended to the current working HEAD....
Read more >
Cherry-pick changes - GitLab Docs
Cherry-pick all changes from a merge request · On the top bar, select Main menu > Projects and find your project. · On...
Read more >
How to 'git cherry-pick' from another branch example
In a previous tutorial, we took a look at how to cherry-pick a commit on the current branch, but one of the ancillary...
Read more >
How to cherry-pick from a remote branch? - Stack Overflow
In the github pull request, look for this text: "merged commit xxxxxxx into..." instead of attempting to use the commit ids from the...
Read more >
git-cherry-pick Documentation - Git
When it is not obvious how to apply a change, the following happens: The current branch and HEAD pointer stay at the last...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found