Skip to content

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

Description

@ShogunPanda

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

Activity

  1. richardlau commented on May 31, 2023

    @richardlau
    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/

  2. anonrig commented on May 31, 2023

    @anonrig
    Member

    cc @nodejs/url

  3. anonrig commented on May 31, 2023

    @anonrig
    Member

    @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;
       }
  4. added
    dnsIssues and PRs related to the dns subsystem.
    on May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dnsIssues and PRs related to the dns subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions