amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

JavaScript error in Google AMP Viewer

Open staceyfenton opened this issue 6 years ago • 6 comments

What's the issue?

We have been experiencing an intermittent issue in the Google AMP Viewer. Navigating away from the AMP page to a non-AMP page and then clicking the browser's back button to return to the AMP page sometimes results in a JavaScript error which prevents the AMP page from being displayed.

How do we reproduce the issue?

  1. Perform a Google search with AMP results
  2. Click on an AMP page
  3. Click on a link within the AMP page which takes you to a non-AMP page
  4. Click the browsers back button to return to the AMP page - sometimes the AMP page fails to load because of a JavaScript error.

Here are some screenshots from Chrome Dev Tools which show the error:

Screenshot 2020-01-21 at 19 27 16 Screenshot 2020-01-21 at 19 27 53

What browsers are affected?

Have replicated this in Chrome for Android and Safari for iOS but issue only happens intermittently.

Which AMP version is affected?

Current version is 2001071857360 but we have noticed this behaviour in previous versions as well.

staceyfenton avatar Jan 23 '20 13:01 staceyfenton

/to @ericfs

jridgewell avatar Mar 06 '20 19:03 jridgewell

/cc @ampproject/wg-viewers

jridgewell avatar Mar 06 '20 19:03 jridgewell

Filed internal issue: b/151612730

Does this happen for particular documents only? Can you share the URL from the screenshot?

ericfs avatar Mar 16 '20 14:03 ericfs

@ericfs the AMP page from the screenshot is https://www.comparethemarket.com/ps/van-insurance/?amp

We have several AMP pages on our website and have noticed the behaviour across multiple pages. However, the issue is intermittent and doesn't happen all the time.

staceyfenton avatar Mar 16 '20 15:03 staceyfenton

Thanks. I can see this result showing up for the query [compare van insurance], though I am not able to reproduce so far.

ericfs avatar Mar 16 '20 15:03 ericfs

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 07 '21 18:09 stale[bot]