amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

'src' attribute set to invalid in amp-mustache script

Open Dnguye92 opened this issue 8 years ago • 34 comments

What's the issue?

By simply including the amp-mustache script tag <script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script> I am seeing an error from the AMP extension stating The attribute 'src' in tag 'amp-mustache extension .js script' is set to the invalid value .

How do we reproduce the issue?

Can't replicate this inside of a jsbin but even by simply using amp-mustache in the playground (https://ampbyexample.com/playground/) you can see this error in the chrome extension

  1. Go to http://jsbin.com/vobolelage/edit?html,output
  2. Copy the code on the left side of the bin and past into https://ampbyexample.com/playground/

What browsers are affected?

As of right now I only see the error on Chrome on Desktops

Which AMP version is affected?

<script async src="https://cdn.ampproject.org/v0.js"></script>

Dnguye92 avatar Jul 26 '18 21:07 Dnguye92

Confirmed - search console is telling people to upgrade to 0.2 but 0.2 is failing the JS validator

image

jpettitt avatar Jul 27 '18 15:07 jpettitt

Looks like there's some skew in the deployment pipeline.

version: 0.2 and deprecated_version: 0.1 were added in the same PR: https://github.com/ampproject/amphtml/pull/16201/files#diff-920b14e1d472072d04dcbfc41ab50294R29

dreamofabear avatar Jul 27 '18 15:07 dreamofabear

Versions should not be introduced and deprecated in the same release cycle for many reasons.

cramforce avatar Jul 27 '18 15:07 cramforce

@Gregable for when the skew would be resolved.

cramforce avatar Jul 27 '18 15:07 cramforce

it's difficult to over-emphasize @cramforce Malte's maxim. It's central to the immutable systems concept practiced at Netflix and advocated by folks like Rich Hickey (https://en.wikipedia.org/wiki/Clojure). You can't breaking existing systems; folks have to voluntarily subscribe to new services. @choumx William has compelling reason to use a new service, but it's my decision when to roll-it-out.

jaygray0919 avatar Jul 27 '18 17:07 jaygray0919

@jaygray0919 Note, that AMP itself is deployed as an an "evergreen" system and it isn't possibly to version lock to the patch level.

The version skew issue in the validator was resolved. @choumx We can call this fixed, right?

We'll follow up with a quick postmortem, since was a process problem.

cramforce avatar Jul 27 '18 17:07 cramforce

Yes, verified that amp-mustache-0.2.js is now valid on both JS and C++ validators.

dreamofabear avatar Jul 27 '18 17:07 dreamofabear

This is now resolved.

Validator rules were updated to simultaneously add support for 0.2 and add a deprecation warning for 0.1. These rules get released at different schedules to different Google products. In this case, Search Console picked up the rules first a few hours ago and began displaying the deprecation warning. The Javascript Validator interfaces, such as the extension you noticed, picked up the change a few minutes ago.

In order to see the changes in your extension faster, you may need to clear your cache / restart your browser. You may also just try to force refresh the code here: https://cdn.ampproject.org/v0/validator.js

Gregable avatar Jul 27 '18 17:07 Gregable

Hi.

Since yesterday I'm getting a lot of errors in search console and it's referencing the URL to amp-mustache v0.2 version:

User-authored JavaScript found on page: The attribute 'src' in tag 'amp-mustache extension .js script' is set to an invalid value

The AMP validator in chrome is saying that everything is ok.

afterdesign avatar Jul 29 '18 07:07 afterdesign

I'm having the same issue as afterdesign. Included v0.2 yesterday because it started validating in browser console. Woke up today and have a ton of errors saying 0.2 is not valid and still have a ton of warnings saying to upgrade to 0.2 in the search console

nikse avatar Jul 29 '18 13:07 nikse

We are aware the search console is erroneously flagging 0.2 as an error. It's not an error and we're working of getting the messaging fixed. This is a knock on effect from the version skew problem.

jpettitt avatar Jul 30 '18 19:07 jpettitt

We have the same problem with 0.2

shinsenter avatar Jul 31 '18 00:07 shinsenter

Please publish an article about this, I'm being inundated with complaints by users experiencing this. We have an app that converts pages into AMP. We updated to 0.2 per the error. We need a link to send them saying this is Google's fault. Help.

stephengardner avatar Jul 31 '18 02:07 stephengardner

Best bet is to send them a link to this issue.

jpettitt avatar Jul 31 '18 13:07 jpettitt

I really need some confidence that this is being fixed, or a timeline on when............

If we revert back to 0.1, will the warning still show? It says that a commit was pushed to remove the deprecation warning but other users seem to be still experiencing warnings.

Please advise ASAP.

stephengardner avatar Jul 31 '18 15:07 stephengardner

It is fixed. Any errors users are seeing are stale. Both 0.1 and 0.2 are considered valid.

jpettitt avatar Jul 31 '18 16:07 jpettitt

THANK you.

stephengardner avatar Jul 31 '18 16:07 stephengardner

Will the url inspection be fixed as well? When I submit a page in the "URL inspection" tool (desktop URL), it still says that the AMP linked version is invalid:

e8qhf73a

mayrop avatar Jul 31 '18 18:07 mayrop

Please email me the URL you are testing (same username @google.com)

jpettitt avatar Jul 31 '18 21:07 jpettitt

Is there a link to the PM document?

Will it be limited to the version skew issue, or to this version bump in general? While there's a versioning policy, it seems like there are some practical considerations which AMP needs to address in the future:

  1. How do publishers know when a library has been deprecated? Are they required to monitor github and amphtml-announce? It seems that GSC is throwing alerts (and possibly emails) due to its integration with AMP validation. Is it the AMP project's recommendation to rely on GSC to become aware of AMP library deprecation? What about pages which Google doesn't crawl (e.g., SEM landing pages)?

  2. According to the deprecation policy an announcement should have been made to amphtml-announce. It looks like this wasn't done.

  3. What's the timeline for deprecation? According to the policy, it's 6 weeks. Is that a hard limit? Should there be a hard date somewhere rather than the ambiguous "may become an error in in the future" (which could mean tomorrow or next year)? In other words, is it possible to set expectations better?

3a. Given that we're seeing more complex AMP implementations from more complex publishers (read: enterprise), is the 6 weeks sufficient? Many companies (including Google) have multi-month code freezes.

jamesshannon avatar Jul 31 '18 22:07 jamesshannon