amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Story is getting stuck and give console error

Open Avdhoot05 opened this issue 7 years ago • 18 comments

Story is getting stuck and give console error- a.signals is not a function. Check the following amp-stories urls:-

https://lovebondings.com/beautiful-love-quotes https://lovebondings.com/romanticdinnerideas https://biologywise.com/genealogical-dna-test https://dogappy.com/how-to-train-cocker-spaniel https://dogappy.com/extra-large-dog-breeds https://biologywise.com/bacteria-vs-virus

Error

Avdhoot05 avatar Nov 02 '19 05:11 Avdhoot05

It seems error is occurring only when story has video

AutadeJS avatar Nov 02 '19 09:11 AutadeJS

console-error

AutadeJS avatar Nov 03 '19 09:11 AutadeJS

The error is still there. Here's an example: https://birthdayfrenzy.com/6birthday-gift-ideas-for-your-music-loving-dear-ones

console-error2

AutadeJS avatar Nov 05 '19 00:11 AutadeJS

The error stack trace is

a.signals is not a function <amp-story-page id=​"p8" class=​"i-amphtml-element i-amphtml-notbuilt amp-notbuilt i-amphtml-layout-container i-amphtml-error" i-amphtml-layout=​"container">​…​</amp-story-page>​
rf @ v0.js:107
(anonymous) @ v0.js:239
Promise.then (async)
Ai.b.build @ v0.js:238
f.build @ v0.js:209
oj @ v0.js:299
kj @ v0.js:298
nj @ v0.js:297
f.upgraded @ v0.js:299
Ai.b.jd @ v0.js:236
Ai.b.Yf @ v0.js:251
Ai.b.connectedCallback @ v0.js:250
ta @ v0.js:8
va @ v0.js:10
(anonymous) @ v0.js:9

This looks like what @jackbsteinberg was seeing when debugging late last week. @gmajoulet do you think you can follow up? We might need to debug with runtime folks on this, but it completely makes the story unusable.

newmuis avatar Nov 05 '19 02:11 newmuis

I suspect the line in question is: https://github.com/ampproject/amphtml/blob/465f7622059e4b85110d37f12f882f7ad8a83048/src/video-interface.js#L532-L534

Called from amp-story-page's: https://github.com/ampproject/amphtml/blob/465f7622059e4b85110d37f12f882f7ad8a83048/extensions/amp-story/1.0/amp-story-page.js#L353-L355

Which is invoked during amp-story-page's buildCallback: https://github.com/ampproject/amphtml/blob/465f7622059e4b85110d37f12f882f7ad8a83048/extensions/amp-story/1.0/amp-story-page.js#L327-L346

@jridgewell is it possible for an <amp-story-page> element to have its buildCallback invoked but not have its descendant <amp-video> even be upgraded to have .signals() defined?

newmuis avatar Nov 05 '19 03:11 newmuis

Yes, you need to wait for upgrade before calling .signals(): https://github.com/ampproject/amphtml/blob/465f7622059e4b85110d37f12f882f7ad8a83048/src/dom.js#L753-L774

jridgewell avatar Nov 05 '19 03:11 jridgewell

Makes sense.

I can't for the life of me figure out why this would have worked previously, then (although, the behavior is flaky). But, we can make this change now.

newmuis avatar Nov 05 '19 03:11 newmuis

The issue is not yet solved. Are the changes yet to reflect live?

AutadeJS avatar Nov 08 '19 14:11 AutadeJS

This fix will be available in the canary opt-in mid next week, and in production the following one. Do you have links to a broken story? The ones you sent in the bug report actually work for me..

gmajoulet avatar Nov 08 '19 16:11 gmajoulet

I think this might be flaky behavior, actually. Maybe we should at least consider a cherry pick into canary?

newmuis avatar Nov 08 '19 17:11 newmuis

https://lovebondings.com/beautiful-love-quotes doesn't work for me on Chrome

AutadeJS avatar Nov 09 '19 04:11 AutadeJS

Stories still not working. E.g. https://quotabulary.com/15of-the-most-inspirational-quotes-about-motherhood

AutadeJS avatar Nov 12 '19 18:11 AutadeJS

The release with the fix should be available with the dev-channel later today. I'll ping this thread with a way to test the fix.

(This story works for me, I'm not sure how to trigger this race condition, I don't know what % of the traffic is affected)

gmajoulet avatar Nov 12 '19 18:11 gmajoulet

Thanks for the update.

Both below stories didn't work the first time for me but worked when I refreshed:

https://quotabulary.com/brene-brown-quotes-to-inspire-and-encourage-you https://quotabulary.com/15of-the-most-inspirational-quotes-about-motherhood

AutadeJS avatar Nov 12 '19 18:11 AutadeJS

amp-error Is this AMP error indicative of anything and how can we solve it?

AutadeJS avatar Nov 12 '19 19:11 AutadeJS

Some more examples: https://missionself.com/boundary-quotes-that-will-redefine-your-limits https://penlighten.com/famous-quotes-by-dr-seuss-that-will-inspire-you https://photografeed.com/a-guide-to-long-exposure-photography https://vacationjoys.app/read-inspirational-camping-quotes-before-your-next-trip https://missionself.com/be-yourself-quotes-to-discover-the-new-you https://vacationjoys.app/6-famous-statues-in-the-world https://missionself.com/why-is-it-important-to-create-a-vision-for-life https://vacationjoys.app/surfing-quotes-that-will-make-you-conquer-the-waves

They all stuck first time, but load when you refresh or visit it second time. Common thing in all these stories is that they have videos.

AutadeJS avatar Nov 12 '19 19:11 AutadeJS

The fix is now rolled out and available on production. We’ve been chasing this bug but really couldn’t reproduce it ourselves... Could you please test on your end and let us know if it’s now working properly?

Thanks!

On Tue, Nov 12, 2019 at 2:18 PM AutadeJS [email protected] wrote:

Some more examples: https://missionself.com/boundary-quotes-that-will-redefine-your-limits https://penlighten.com/famous-quotes-by-dr-seuss-that-will-inspire-you https://photografeed.com/a-guide-to-long-exposure-photography

https://vacationjoys.app/read-inspirational-camping-quotes-before-your-next-trip https://missionself.com/be-yourself-quotes-to-discover-the-new-you https://vacationjoys.app/6-famous-statues-in-the-world https://missionself.com/why-is-it-important-to-create-a-vision-for-life

https://vacationjoys.app/surfing-quotes-that-will-make-you-conquer-the-waves

They all stuck first time, but load when you refresh or visit it second time. Common thing in all these stories is that they have videos.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ampproject/amphtml/issues/25386?email_source=notifications&email_token=AALMITB2DCKMPDDMHUFJ26LQTL6RBA5CNFSM4JIDDD5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED3TIUI#issuecomment-553071697, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALMITGWIQ6HOSGX5ICZ4TTQTL6RBANCNFSM4JIDDD5A .

-- Gabriel Majoulet | Software Engineer | [email protected]

gmajoulet avatar Nov 21 '19 17:11 gmajoulet

It's solved now. It was occurring on Chrome on Windows 10.

AutadeJS avatar Dec 05 '19 05:12 AutadeJS