question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Badly Documented Upgrade from Warning to Error

See original GitHub issue

Information

The new warning takes this pattern

The tag 'TAG_HERE' is missing or incorrect, but required by the 'TAG_HERE extension .js script'. This will soon be an error. (see https://www.ampproject.org/docs/reference/extended/TAG_HERE.html)

Firstly, none of my tags or incorrect. I know this because the tag type it warns me about is no where on the page. That means it must be missing. I think this should be a separate warning as they are very different issues.

Secondly, this is a pretty serious change and the documentation provided neither has a date for this upgrade to error nor details explaining what exactly the change is. It just has the standard custom element documentation (for example)

From what I’ve ascertained, the issue is that I’ve included a custom element script and then never created an instance of that custom element tag.

This is inconvenient, as it means developers must know every piece of content on the page before render time and then choose to only dynamically import the custom element scripts that will occur on the page.

I understand and accept that developer convenience is not a driving principle of AMP, but we must at least be given an explanation of the change and a date of deprecation/error-upgrade before such an intense warning is given so that we may have ample time to update our applications.

This update would cause every single AMP page our site currently serves to start error’ing (10s of thousands), not just a select few like usual with upgrades. We currently have nearly every AMP page showing this warning.

When is this going into effect? Is my understanding of the warning correct?

How do we reproduce the issue?

http://www.refinery29.com/amp/japanese-decora#development=1 You can view the console and see these warnings about the element being missing after the script being imported. This never used to be the case.

More abstractly

  1. Create AMP valid page which imports a custom element script (say, amp-anim)
  2. Do not create an instance of the AMP HTML custom element (no <amp-anim> on page)
  3. See warnings
  4. Create instance of <amp-anim>
  5. Warning disappears

What browsers are affected?

All

Which AMP version is affected?

Current, which is 1483661191373

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Gregablecommented, Jan 10, 2017

Agreed. I’ll soon be changing the error message to (using youtube as an example):

The extension 'amp-youtube extension .js script' was found on this page, but is unused (no 'amp-youtube' tag seen). This may become an error in the future.

1reaction
chrisstonekingcommented, Jan 11, 2017

@Gregable Thanks for the information. Our system is having the same problem: Every AMP on our site is valid except for this new warning, so it’s nice to know there will be plenty of time to fix this if it really does become an error.

I started a topic about this in Google Groups, and Guilherme mentioned the cache could simply remove unneeded extension scripts and serve the page without them.

Any idea about whether you’re gonna do that instead? I’m just a little concerned about whether this warning really will become an error - we could update our system to dynamically check the extension scripts and only include the needed ones, but in our case that would probably be worse for performance, not better, due to the architecture of our system (we use Java Server Pages, and currently the head of an AMP is always rendered before the body).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Correct the upgrade documentation? - Ideas - Ghost Forum
I'm attempting to upgrade to version 2.0.2 from 1.22 and am getting a “Message: Unexpected end of JSON input” error upon running “ghost...
Read more >
6 Upgrade Error Messages - Oracle Help Center
This chapter describes the error and warning messages, their causes, and suggested actions that may be encountered when upgrading to OracleAS Portal or...
Read more >
Warning: Recovery file generation failed | Confluence
While the warning will not cause the upgrade to fail. It should be taken seriously as it can mean that there would not...
Read more >
Compiler Warning (level 3) C4635 - Microsoft Learn
The problem with this sample is that the end tag for <summary> is poorly formed, and the compiler does not recognize it as...
Read more >
Errors and Warnings — Verilator 5.005 documentation
Warning that a Verilator metacomment, or configuration file command uses syntax that has been deprecated. Upgrade the code to the replacement typically ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found