Amphtml: AMP page is breaking when browser cached files are loading

Created on 23 Nov 2019  Â·  11Comments  Â·  Source: ampproject/amphtml

AMP page is breaking when browser cached files are loading. Its hard to replicate, but when the issue occurs there are many javascript errors in console. Ads are not loading. If I do cache refresh or ctrl + F5, it works fine. But, I can tell that to website visitors. If I try from different browser, it works without cache refresh. So, I suspect it should be something with browser cached files. It works if I browse the google amp cache url.

Please check below pages.
https://firstranker.com/mbbs/mbbs-2008-2019-question-papers-rajiv-gandhi-university-health-sciences/?amp
https://firstranker.com/fr.php/frdA041119A132440/download-ptu-b.tech-1st-semester-[2019]-70970-engineering-math-iii-question-papers
fr

please find below the errors from console. Attached screenshot

amp.js:157 Powered by AMP âš¡ HTML - Version 1911062056110 https://firstranker.com/?amp extensions-impl.js:258 Uncaught (in promise) TypeError: Cannot read property 'setAttribute' of null

at Yl.f.reloadExtension (extensions-impl.js:258)
at jm (runtime.js:919)
at gm (runtime.js:208)
at lm (runtime.js:325)
at wi.qd (amp.js:118)
at vi (chunk.js:192)
at ri.Ze (chunk.js:410)
at chunk.js:461
amp-ad-0.1.js:1 Uncaught TypeError: (intermediate value)(intermediate value).push is not a function

at amp-ad-0.1.js:1
amp-loader-0.1.js:1 Uncaught TypeError: (intermediate value)(intermediate value).push is not a function

at amp-loader-0.1.js:1
amp-auto-lightbox-0.1.js:1 Uncaught TypeError: (intermediate value)(intermediate value).push is not a function

at amp-auto-lightbox-0.1.js:1
High Priority Bug caching

All 11 comments

cc @lannka

Screen Shot 2019-11-25 at 9 58 21 AM

Not sure if it is related to the issue you're reporting, but the first example page has the amp-ad script included 2 times, which is consistently causing a different error message in the console:

amp-ad is already registered. The script tag for amp-ad is likely included twice in the page.
vf @ error.js:195

I also suspect that the cache problem can be caused by mixing amp-xyx-latest.js with amp-zyx-0.1.js on the same doc. Any reason to do so?

@choumx @jridgewell do you see similar issue in the past? What's our current recommendation on using -latest

Ah, the new getExtensionScript_() doesn't handle -latest alias. Lots of bugs in this code path.

Seems like we should make getExtensionScript_ use parseExtensionUrl, and fix parseExtensionUrl to parse -latest.

Looks like a top 25 error overall. go/ampe/CI2FwOC7-YT7-wE shows O(thousands) of errors per day.

Screen Shot 2019-11-25 at 9 58 21 AM

Not sure if it is related to the issue you're reporting, but the first example page has the amp-ad script included 2 times, which is consistently causing a different error message in the console:

amp-ad is already registered. The script tag for amp-ad is likely included twice in the page.
vf @ error.js:195

this is different issue, I can fix it from my code

Looks like a top 25 error overall. go/ampe/CI2FwOC7-YT7-wE shows O(thousands) of errors per day.

Thank you for fixing the issue..

Looks like a top 25 error overall. go/ampe/CI2FwOC7-YT7-wE shows O(thousands) of errors per day.

Thank you for fixing the issue..

hello, how could you solve it? , I have the same problem, some functions do not work, sometimes yes and sometimes not

The fix will be released to production tomorrow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

choumx picture choumx  Â·  3Comments

gmajoulet picture gmajoulet  Â·  3Comments

westonruter picture westonruter  Â·  3Comments

jpettitt picture jpettitt  Â·  3Comments

edhollinghurst picture edhollinghurst  Â·  3Comments