JavaScript error in Google AMP Viewer
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?
- Perform a Google search with AMP results
- Click on an AMP page
- Click on a link within the AMP page which takes you to a non-AMP page
- 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:
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.
/to @ericfs
/cc @ampproject/wg-viewers
Filed internal issue: b/151612730
Does this happen for particular documents only? Can you share the URL from the screenshot?
@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.
Thanks. I can see this result showing up for the query [compare van insurance], though I am not able to reproduce so far.
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.