Skip to content
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

test/internet/test-dns-idna2008.js fails #48262

Closed
ShogunPanda opened this issue May 31, 2023 · 3 comments · Fixed by #48354
Closed

test/internet/test-dns-idna2008.js fails #48262

ShogunPanda opened this issue May 31, 2023 · 3 comments · Fixed by #48354
Labels
dns Issues and PRs related to the dns subsystem.

Comments

@ShogunPanda
Copy link
Contributor

Version

v20.2.0 and v21.0.0-pre

Platform

Darwin panda.local 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6020 arm64

Subsystem

whatwg-url

What steps will reproduce the bug?

Run

out/Release/node test/internet/test-dns-idna2008.js

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

Test should pass

What do you see instead?

node:internal/errors:490
    ErrorCaptureStackTrace(err);
    ^

Error: queryA ENOTFOUND straße.de
    at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:251:17) {
  errno: undefined,
  code: 'ENOTFOUND',
  syscall: 'queryA',
  hostname: 'straße.de'
}

Additional information

Maybe related to #47920

@richardlau
Copy link
Member

I think this started failing on the daily CI on 11 May in https://ci.nodejs.org/view/Node.js%20Daily/job/node-daily-master/3042/

@anonrig
Copy link
Member

anonrig commented May 31, 2023

cc @nodejs/url

@anonrig
Copy link
Member

anonrig commented May 31, 2023

@ShogunPanda @targos I don't think this is related to ada-url/idna. Previously cares was returning ESERVFAIL and right now it returns ENOTFOUND, and .errno attribute is no longer returning anything.

I've also added a test case to ada-url/idna as well.

Here's the error message:

{
  err: Error: queryA ENOTFOUND straße.de
      at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/callback_resolver:45:19) {
    errno: undefined,
    code: 'ENOTFOUND',
    syscall: 'queryA',
    hostname: 'straße.de'
  }
}

Here's the diff to pass the test case. I don't know if it's true.

diff --git a/test/internet/test-dns-idna2008.js b/test/internet/test-dns-idna2008.js
index 16c8933073..fb93b7a97a 100644
--- a/test/internet/test-dns-idna2008.js
+++ b/test/internet/test-dns-idna2008.js
@@ -41,16 +41,16 @@ dns.promises.lookup(fixture.hostname, { family: fixture.family })
   .then(({ address }) => {
     assert.strictEqual(address, fixture.expectedAddress);
   }, (err) => {
-    if (err && err.errno === 'ESERVFAIL') {
-      assert.ok(err.message.includes('queryA ESERVFAIL straße.de'));
+    if (err && err.code === 'ENOTFOUND') {
+      assert.ok(err.message.includes('queryA ENOTFOUND straße.de'));
     } else {
       throw err;
     }
   }).finally(mustCall());
 
 dns.resolve4(fixture.hostname, mustCall((err, addresses) => {
-  if (err && err.errno === 'ESERVFAIL') {
-    assert.ok(err.message.includes('queryA ESERVFAIL straße.de'));
+  if (err && err.code === 'ENOTFOUND') {
+    assert.ok(err.message.includes('queryA ENOTFOUND straße.de'));
     return;
   }
   assert.ifError(err);
@@ -61,8 +61,8 @@ const p = new dns.promises.Resolver().resolve4(fixture.hostname);
 p.then((addresses) => {
   assert.deepStrictEqual(addresses, [fixture.expectedAddress]);
 }, (err) => {
-  if (err && err.errno === 'ESERVFAIL') {
-    assert.ok(err.message.includes('queryA ESERVFAIL straße.de'));
+  if (err && err.code === 'ENOTFOUND') {
+    assert.ok(err.message.includes('queryA ENOTFOUND straße.de'));
   } else {
     throw err;
   }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dns Issues and PRs related to the dns subsystem.
Projects
None yet
3 participants