-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v20 dns.reverse throws on ::1 #47847
Comments
I can't reproduce and I have a hard time imagining how that particular error could happen. The only place where Lines 1361 to 1369 in 76ae7be
And I know for a fact that uv_inet_pton() parses ::1 just fine.
|
Our CI tests for Haraka started failing on node 20 at least a couple weeks ago. Yesterday I dove in to figure out why. Here is a GitHub workflow action where the test passes on node 16 and 18 (and all previous versions) but fails on node 20. I deinstalled node 18 on my development mac and installed v20 and was able to reproduce the error. I fixed it yesterday in this commit. |
Long shot but can you try with v20.1.0? |
No need to try - you should upgrade. :-) v20.1.0 works, v20.0.0 doesn't - I just tested. Closing. |
Version
20.0.0
Platform
Darwin (mac OS) & Ubuntu
Subsystem
dns
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Every time I've tried.
What is the expected behavior? Why is that the expected behavior?
I'm calling a function with a callback and a parameter. I'm expecting to receive a callback, perhaps with an error.
What do you see instead?
Uncaught Error: getHostByAddr EINVAL ::1
Additional information
The throwing behavior of
dns.reverse
is still wrong (since at least #3112) and should be fixed. The error should be returned in the callback instead of throwing. A test suite of mine is now failing on node.js v20 and now I have to go add wrapper code around a use of dns.resolve because the most used IPv6 address on the planet (::1) isn't being recognized as valid.Also, throwing when an IP resolves to an empty list (#45575), which isn't even an error 🤯 , is at the very least a POLA violation. Doesn't returning an ENOTFOUND with an empty list seem a whole lot more sensible? If fixing the behavior isn't possible, is it not also a bug that throwing under ordinary and expected circumstances is not documented?
The text was updated successfully, but these errors were encountered: