Hi AMP Team,
We are getting a WARNING in G console: "The script tag contains invalid JSON that cannot be parsed"
Ref: https://nature.visualstories.com/paper-recycling-process
But when we validate the above JSON there is no such warning or error reflecting.
We're experiencing the same exact problem. Google Search console returns this warning:
"The script tag contains invalid JSON that cannot be parsed"
but validation is successful and no warnings or errors are returned. Google console highlights all amp tags containing JSON like
<amp-geo layout="nodisplay">
<script type="application/json">
{
"ISOCountryGroups": {
"eea": [ "at", "be", "bg", "cy", "cz", "de", "dk", "ee", "es", "fi", "fr",
"gb", "gr", "hr", "hu", "ie", "is", "it", "li", "lt", "lu", "lv", "mt", "nl",
"no", "pl", "pt", "ro", "se", "si", "sk"]
}
}
</script>
</amp-geo>
The warnings showed up just a couple of days ago, even though the pages were the same as before, no changes, Maybe a bug in some new version of the validator used by Google console?
Exact the same problem here. 13.000 pages with warnings since yesterday.
This same issue is happening at https://amp.magnetjewelrystore.com/allssgend.html and dozens of other AMP pages on the same domain.
Note, this is just a warning.
/cc @ampproject/wg-caching
Removing all newlines in the the application/json - Tags solves the problem for me.
see https://support.google.com/webmasters/thread/29367056?hl=en -> https://twitter.com/westonruter/status/1230920547132792832?s=19
Now, it's not showing any WARNING ....Thanks
This is being reported as a warning in search console and has no impact on your appearance in search. The issue has already been resolved, but your pages will need to be re-indexed before the warning will disappear.
Most helpful comment
Exact the same problem here. 13.000 pages with warnings since yesterday.