amphtml-validator returns this.sandbox.amp.validator.categorizeError is not a function
##What's the issue? Running amphtml-validator via command line returns
this.sandbox.amp.validator.categorizeError is not a function
How do we reproduce the issue?
- install the latest amphtml-validator package from
- run amphtml-validator file.html #this file is attached as file.zip in this ticket. file.html.zip returns: this.sandbox.amp.validator.categorizeError is not a function
What browsers are affected?
amphtml-validator via command line is affected
same problem, is there a solution?
it seems we need to upgrade to the latest version https://github.com/ampproject/amphtml/commit/7d7b8d6d0ef7767a2b319c7fbd1959dffbc8931e#diff-5185ebf96af6c84dd9d0f25168752664L279
Tried on 1.0.26 which is the latest and was released 3 days ago, same error.
yeah, I still see the old code in v1.0.26, I think they meant to publish v1.0.25
Man this is really putting me in a bad position, how the f*ck did they manage to do this....
I'm using version 1.0.21 and it's also broken, but it worked a few hours ago.
It's broken because amphtml-validator tries to run https://cdn.ampproject.org/v0/validator.js which doesn't contain the said function anymore.
all amphtml-validator versions use what is published in https://cdn.ampproject.org/v0/validator.js, categorizeError method was removed here from the validator engine
Oh I am going mental over this... [censored..]
my apologies.
@jackbillstrom, that's not productive at all. You can still remove the line locally for amphtml-validator in your node_modules folder. That's what I did until they fix it.
Bugs will happen from time to time. You don't have to be a script kiddie on an internship to cause them, even if you work at Google.
@kevva , Can you give more details as for what changes can be done locally in node_modules until (or if) they fix this?
@kevva Productive or not, I couldn't understand on to get passed this bug. Of course I then come with some hard-on questions.
Thus, as you say, bugs always occur but this was just so annoying.
Thanks. :smiling_imp:
@liorbashan, in node_modules/amphtml-validator/index.js on line 279 or something like that.
@kevva , Thank you :) This is obviously a temporary solution. Still wondering why would they remove the error documentations from this service, since it was really useful. (more useful than amp.dev documentations :))
What can be done towards the emergence of the amp cache wedding videos for some videos does not work properly at the scales amp. For example ; https://pornoyakala.com/amp/ why this raya gidrdinmi size is not bigger 16/9?
all
amphtml-validatorversions use what is published inhttps://cdn.ampproject.org/v0/validator.js,categorizeErrormethod was removed here from the validator engine
that is unfortunate. there really should be a way to run validation while only depending on local code. filed https://github.com/ampproject/amphtml/issues/25200 to track this.
/cc @Gregable @ampproject/wg-caching
@jackbillstrom your comments above are violating AMP's Code of Conduct which aim to promote civil discourse on all AMP channels.
Please ensure that all future comments follow the Code of Conduct. We understand that the current situation is upsetting, however, personally attacking any of our other members is not pushing discussion forward.
Validator error categories and all the references to amp.validator.categorizeError were removed https://github.com/ampproject/amphtml/pull/25134 validator rollup.
Publishing a updated amphtml-validator npm package now.
amphtml-validator version 1.0.27 published. Please update the amphtml-validator dependencies to use latest version.
In future, we will make sure any changes in validator.js do not break nodejs package and/or get caught during the release.
Please reopen the issue if you still see the error, or I missed something. PS: This is my first npm publish.