-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
AssertionError: args[1]->IsString()
when custom DNS lookup callback returns array instead of string
#57112
Comments
Would you like to send a PR? |
Thanks for your invitation, but I currently don't have much time to deeply inverstgate the problem and fix it since I have 4 project running concurrently. |
nodejs-github-bot
pushed a commit
that referenced
this issue
Mar 1, 2025
PR-URL: #57192 Fixes: #57112 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Jason Zhang <xzha4350@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
aduh95
pushed a commit
that referenced
this issue
Mar 9, 2025
PR-URL: #57192 Fixes: #57112 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Jason Zhang <xzha4350@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v23.4.0
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
It reproduces 100% of the time when using a custom DNS lookup that returns an array instead of a string as the address.
This requires running on Node.js
v23.4.0
(and likely later versions) onDarwin
. Not tested on other version, but likely can reproduce the same result.What is the expected behavior? Why is that the expected behavior?
The DNS lookup callback should either return a valid string IP address or pass an error to the callback.
In other words, if the lookup returns an invalid type (like an array), Node.js should handle it gracefully—by invoking the callback with an error—rather than crashing.
This behavior is expected to ensure that user code can handle lookup errors consistently without encountering an internal assertion failure.
What do you see instead?
Instead of passing an error to the callback, Node.js crashes with an assertion error:
Crash Log
Additional information
No response
The text was updated successfully, but these errors were encountered: