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

The "lookup timeout no error (ip address)" test is fail on node@12.19.0 #1497

Closed
2 tasks done
mrmlnc opened this issue Oct 10, 2020 · 1 comment
Closed
2 tasks done

Comments

@mrmlnc
Copy link
Contributor

mrmlnc commented Oct 10, 2020

Describe the bug

  • Node.js version: 12.19.0
  • OS & version: Ubuntu 20.04 LTS

Steps to reproduce

git clone https://github.com/sindresorhus/got
cd got

nvm use 12.19.0
# or
volta install node@12.19.0
# or
nvs 12.19.0

npm i
npm t

Description

The problem was found in #1495 (comment).

The original output from `npm t`
  lookup timeout no error (ip address)

  Promise rejected with:

  RequestError {
    code: 'ECONNRESET',
    timings: {
      abort: undefined,
      connect: 0,
      end: undefined,
      error: 800,
      lookup: 0,
      phases: {
        dns: 0,
        download: undefined,
        firstByte: undefined,
        request: 0,
        tcp: 0,
        tls: undefined,
        total: 800,
        wait: 0,
      },
      response: undefined,
      secureConnect: undefined,
      socket: 0,
      start: 0,
      upload: 0,
    },
    message: 'socket hang up',
  }

   dist/test/timeout.js:271:13
   dist/test/helpers/with-server.js:37:15



  Uncaught exception in test/timeout.ts

  Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
  Please open an issue with this stack trace at https://github.com/nodejs/node/issues


   Please open an issue with this stack trace at https://github.com/nodejs/node/issues
   assert (internal/assert.js:14:11)
   TCP.onStreamRead (internal/stream_base_commons.js:188:23)

  

  1 test failed

Additional debug

After some debug I found the following error:

Request error
RequestError: socket hang up
    at ClientRequest.<anonymous> (/home/mrmlnc/projects/got/dist/source/core/index.js:957:25)
    at Object.onceWrapper (events.js:421:26)
    at ClientRequest.emit (events.js:326:22)
    at ClientRequest.origin.emit (/home/mrmlnc/projects/got/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)
    at Socket.socketOnEnd (_http_client.js:459:9)
    at Socket.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1223:12)
    at connResetException (internal/errors.js:609:14)
    at Socket.socketOnEnd (_http_client.js:459:23)
    at Socket.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1223:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  code: 'ECONNRESET',
  timings: {
    start: 0,
    socket: 0,
    lookup: 0,
    connect: 0,
    secureConnect: undefined,
    upload: 0,
    response: undefined,
    end: undefined,
    error: 800,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 0,
      tcp: 0,
      tls: undefined,
      request: 0,
      firstByte: undefined,
      download: undefined,
      total: 800
    }
  }
}

Also I found that the test is successful when run only it (by .only). And the test always fail if it is run after the connect timeout test.

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.
@szmarczak
Copy link
Collaborator

Got 12 (releasing in the next few days) doesn't support Node.js 12, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants