amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-ad not rendering in amp-carousel

Open rogers-kyle opened this issue 9 years ago • 8 comments

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)

rogers-kyle avatar Apr 11 '17 21:04 rogers-kyle

/to @camelburrito

aghassemi avatar Apr 12 '17 20:04 aghassemi

@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.

ericlindley-g avatar Apr 26 '17 17:04 ericlindley-g

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

camelburrito avatar Apr 26 '17 18:04 camelburrito

/cc @ampproject/a4a

FYI from local testing with Fast Fetch enabled, I never see onLayoutMeasure execute.

keithwrightbos avatar Apr 27 '17 14:04 keithwrightbos

This is definitely scheduling fault. Looks like a race condition b/w built phase of an Ad and a carousel.

dvoytenko avatar May 02 '17 00:05 dvoytenko

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)

rogers-kyle avatar May 11 '17 21:05 rogers-kyle

@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.

dvoytenko avatar May 11 '17 22:05 dvoytenko

I'm sorry for the misunderstanding, thanks a lot for jumping on this so quickly.

rogers-kyle avatar May 12 '17 15:05 rogers-kyle