amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-ad / onResizeDenied and onResizeSuccess not called anymore

Open RonanDrouglazet opened this issue 10 years ago • 8 comments

Short description of your issue:

Hi AMP Team !

As we can see here https://github.com/ampproject/amphtml/tree/master/ads#ad-resizing when an ad ask for a resize, they should get a response with onResizeDenied OR onResizeSuccess

It's not the case anymore since the July 14 Release (https://github.com/ampproject/amphtml/releases/tag/1468017284333)

How do we reproduce the issue?

You can reproduce here http://amp.teads.tv/test/resize.html

This sample only load a little js in our amp-ad component in place of our production framework

document.body.style.background = "orange"

window.context.onResizeDenied(function() {
    document.body.style.background = "red"
})

window.context.onResizeSuccess(function() {
    document.body.style.background = "green"
})

var askResize = function() {
    window.context.requestResize(window.innerWidth, 200)
    setTimeout(askResize, 1000)
}

askResize()

As you can see, the background color has to change if we received a response

Currently in the sample, the resize seems to be accepted because our component is "open" (we start to height=1)

What browsers are affected?

All browsers / devices

Which AMP version is affected?

Since 1468017284333

RonanDrouglazet avatar Jul 18 '16 16:07 RonanDrouglazet

/to @sriramkrish85 PTAL

dvoytenko avatar Jul 18 '16 17:07 dvoytenko

screen shot 2016-07-18 at 11 07 28 am

camelburrito avatar Jul 18 '16 18:07 camelburrito

@RonanDrouglazet , Thanks for filing the bug.

i am seeing the ad turn to red. (when i inspect on chrome). But never seeing it turn green when below viewport.

I dont see any changes to the API in the said release. Will continue to investigate and check if this is really an issue.

camelburrito avatar Jul 18 '16 18:07 camelburrito

Thanks for your time @sriramkrish85 ! Yes i know, i have checked the changelog but does not see anything related either

But if i use the previous release (July 7), everything is ok !

Also, we really don't have the same result with this sample page. I always have an orange ad, i tried on iphone / android / desktop (@work) and just now, at home, on a chrome desktop (mac os) and iPhone simulator, same, always orange (so no response at all)

But with you, it works ! You have a response (red = denied) and i think it's normal, the little script loop on requestSize, even if we get a response so when we are in the viewport the ad goes from green to red (little mistake from my sample, fixed by tomorrow)

Still, why don't we have the same result at all ? I never have any response (color stay orange) @work & @home... really strange

capture d ecran 2016-07-18 a 22 43 10 capture d ecran 2016-07-18 a 22 53 54

AMP version 1468521759997

RonanDrouglazet avatar Jul 18 '16 21:07 RonanDrouglazet

When i load this page on the top, no scroll, i never get any response from requestResize

When i load this page OVER our amp-ad component, resize is denied (normal) but as you can see in my attached screen record, i have a response ! Denied (red), but still, it's a response

So in the "classic" use case, it never work for me :(

amp-resize.mp4.zip

RonanDrouglazet avatar Jul 18 '16 21:07 RonanDrouglazet

Did the fix work? Is it time to close this issue?

lannka avatar Jul 28 '16 23:07 lannka

Yes On Thu, Jul 28, 2016 at 4:25 PM Hongfei Ding [email protected] wrote:

Did the fix work? Is it time to close this issue?

—

You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub https://github.com/ampproject/amphtml/issues/4109#issuecomment-236054304, or mute the thread https://github.com/notifications/unsubscribe-auth/ANd2kCGg1KkL_q3W2C-4DmyTrv_8g_r1ks5qaTpUgaJpZM4JO41z .

You received this message because you are subscribed to the Google Groups "amphtml-eng-github" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/issues/4109/236054304%40github.com https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/issues/4109/236054304%40github.com?utm_medium=email&utm_source=footer .

amphtml-team avatar Jul 28 '16 23:07 amphtml-team

Yes it works perfectly @lannka !! Thanks a lot

RonanDrouglazet avatar Jul 29 '16 08:07 RonanDrouglazet