Update to new cares_wrap.getaddrinfo() interface.#200
Update to new cares_wrap.getaddrinfo() interface.#200agnat merged 1 commit intoagnat:masterfrom bnoordhuis:fix199
Conversation
There was a problem hiding this comment.
If you check commit nodejs/node@e007f66, you will see that this function now actually requires 5 arguments, so the correct syntax would be cares.getaddrinfo(req, host, family, 0, false).
As of node.js v8.6.0, the method takes a fifth argument that is a boolean. `false` is as of this time the default value. This is a quick fix. node_mdns really should not be depending on node.js internals like this because it inevitably breaks. Fixes: #199 Refs: nodejs/node#14731
|
Hello, I have made an update to node on 8.7.0 I get the following error message. The same message I have already received with 8.6.0 and 8.5.0. The last working version is 8.4.0 without this error. I have had hope that it was fixed in the 8.7.0? Okt 13 20:21:42 Server homebridge[27375]: /usr/local/bin/node[27375]: ../src/cares_wrap.cc:1944:void node::cares_wrap::{anonymous}::GetAddrInfo(const v8::FunctionCallbackInfov8::Value&): Assertion `args[4]->IsBoolean()' failed. |
|
@Nastra888 Node 8.5+ just changed how this call functions. Node was never broken, node_mdns is. Either use the change from this PR or downgrade to Node 8.4 or lower until this PR is committed. |
|
I do not quite understand what you mean with PR? The error is not with node, if I understand you correctly with node mdns? |
|
@Nastra888 in your project, open |
|
Thank You for your quick answer. I have change line 117 but I get the same error message. Do you have a other idea ? Okt 14 06:51:37 Server homebridge[1178]: /usr/local/bin/node[1178]: ../src/cares_wrap.cc:1944:void node::cares_wrap::{anonymous}::GetAddrInfo(const v8::FunctionCallbackInfov8::Value&): Assertion `args[4]->IsBoolean()' failed. |
|
Thanks for the patch, @bnoordhuis. I just published it as v2.3.4.
Absolutely. The linux getaddr stuff is such a sore point. Constantly (semi-) broken and just a mess. Apologies to everyone. This totally slipped my mind. |
|
@agnat I still get this error displayed, do you have an idea why? |
|
Nope, no clue. Sorry. |
As of node.js v8.6.0, the method takes a fourth argument that is a
boolean.
falseis as of this time the default value.This is a quick fix. node_mdns really should not be depending on
node.js internals like this because it inevitably breaks.
Fixes: #199
Refs: nodejs/node#14731
I don't know what node.js versions node_mdns ostensibly supports (I saw a node-waf script in there!) but I'd rip out this code altogether and use the public API.