mozilla/html5-lint

Calls to validation service failing with "Cannot read property 'messages' of undefined"

Opened this issue · 8 comments

Calls to validation service failing with:

Fatal error: Cannot read property 'messages' of undefined Cannot read property 'messages' of undefined

if you add throw err line to your code like:

...
  }, function (err, css) {
    if (err) throw err;
    var minified = new cleanCSS().minify(css).styles;
...

execution should report: Error: Internal Server Error
This happend to me too. No clue. Seems server https://validator.mozillalabs.com/ is down.

@git-no As far as I can see html-lint uses https://html5.validator.nu/.

I got that from the README.md of this repo.
It says: "This is a node.js and Python front-end to the Mozilla Labs' HTML Validator Web Service, located at https://validator.mozillalabs.com/."
Is the README wrong?

Looks as though it is.

I'm having the same issue (reported on this package's Gulp implementation here.

I suspect the API for html5.validator.nu has changed and broken this client.

Any updates?

I installed gulp-html-lint today and had similar problems.
Basically, I get a Bad Request (400) which tells me that there must be a UA-Header attached.
This is also shown in the example on https://github.com/validator/validator/wiki/Service-%C2%BB-Input-%C2%BB-POST-body.

After fixing this locally the service worked again.
How did you guys work around the issue? Manual validation? Another tool?