amp-ad not rendering in amp-carousel
Short description of your issue:
For an amp-carousel that is visible on the initial load, an amp-ad in the first slide does not (regularly) trigger. Very occasionally it does load (it is more frequent when dev tools is open) so it seems to be a race condition between amp-ad and amp-carousel. All other slides after the inital load render the ad correctly, and going back to the first slide after moving away will then correctly render the ad.
How do we reproduce the issue?
https://www.forbes.com/test/krogers/ampadinampcarousel.html
Land on the page, there is an amp-ad tag on top of the first slide, but it does not load. Go to the next slide, there is also an ad on top of the next slide and it should load. Go back to the first slide and you can see the first ad load.
Note that sometimes it will load if you have dev tools open, it seems like there is a race condition so the dev tools must slow it down for long enough that the amp-ad can load.
What browsers are affected?
So far I've only tested it in desktop chrome and android chrome (both current) and it is happening in both places.
Which AMP version is affected?
The amp version is Version 1491601970987. I only attempted to try this yesterday after a recommendation from the amp team for this to be the way to implement something akin to a mobile ad that refreshes on slide change (attempting to replicate gallery pages)
/to @camelburrito
@camelburrito , have you had a chance to check this out at all? I'm wondering if this is something to solve in amp-carousel or if there's a core issue at play.
wasn't there another bug opened like this (i could not find it now due to my poor search skills). The ad is display:block and in fact i see the ad loader on the page , not sure if something is wrong with the tag , routing to @lannka
/cc @ampproject/a4a
FYI from local testing with Fast Fetch enabled, I never see onLayoutMeasure execute.
This is definitely scheduling fault. Looks like a race condition b/w built phase of an Ad and a carousel.
Hey everyone,
I see that the ticket was marked as closed, and it looks good on my desktop, but it's still not working on mobile (android or iphone)
@krogersforbes Thanks a lot for chiming in. The issue was fixed in https://github.com/ampproject/amphtml/pull/9169 - you can check on it - we will mark it "In PROD" once it has been rolled out. It should be live by the end of next week.
I'm sorry for the misunderstanding, thanks a lot for jumping on this so quickly.