Node 8.5 on raspberry breaks the current GetAddrInfo call
With node 8.5 on raspbian /usr/bin/node[18904]: ../src/cares_wrap.cc:1944:void node::cares_wrap::{anonymous}::GetAddrInfo(const v8::FunctionCallbackInfov8::Value&): Assertion `args[4]->IsBoolean()' failed.
This seems to be due to dns: add verbatim option to dns.lookup() on https://github.com/nodejs/node/commit/e007f66ae211192f385dc253bfa19a84e7fc649a
reflecting to https://github.com/agnat/node_mdns/blob/master/lib/resolver_sequence_tasks.js#L153
I'm having the same issue on Mac OSX :( did you find any workaround until mdns get a fix ?
I got that error and applied the patch from https://github.com/bnoordhuis/node_mdns/commit/bd0c7aea810e2b2759831b07e50d3e920eae463f but it was still crashing with
Error: getaddrinfo -3008
at errnoException (/home/admin/Documents/UnitLabs/other_implementations/node/test_libs/mdns/node_modules/mdns/lib/resolver_sequence_tasks.js:199:11)
at getaddrinfo_complete (/home/admin/Documents/UnitLabs/other_implementations/node/test_libs/mdns/node_modules/mdns/lib/resolver_sequence_tasks.js:112:10)
at GetAddrInfoReqWrap.oncomplete (/home/admin/Documents/UnitLabs/other_implementations/node/test_libs/mdns/node_modules/mdns/lib/resolver_sequence_tasks.js:120:9)
After some digging: changed
req.oncomplete = function oncomplete(err, addresses) {
getaddrinfo_complete(err, addresses, cb);
}
to
req.oncomplete = function oncomplete(err, addresses) {
if(addresses == null) return;
getaddrinfo_complete(err, addresses, cb);
}
As addresses were coming null... it works now, but I am a little confused with that code there... investigating :)
ok...
node_modules/mdns/lib/resolver_sequence_tasks.js Line 112, changing from cb(errnoException(err, 'getaddrinfo')); to cb(undefined, []); made my ip appear again.