Skip to content

newman via postman-runtime and localhost doesn't play nice with node 20.1.0 #3104

Description

@vgw-chriskruger

Attempts to contact localhost are not resolved. One gets an exception.

GET http://localhost:8080/api/collection/0b023ef7-90cd-4d64-b4c4-d8122738b61c [errored]
     Invalid IP address: undefined

I have started debugging this myself. It seems to be an interaction between node v20.10 and Newman in the postman-runtime. It works fine under node 18. In fact I believe the problem begins with the PR nodejs/node#44731.

The lookup function within https://github.com/postmanlabs/postman-runtime/blob/8d3d3a870b691583645c696acd5bb7330ce99473/lib/requester/core.js#L303 ends up being called here https://github.com/nodejs/node/blob/24615bd409d148c9ef2d03d6706d0807d5df4557/lib/net.js#L1380 and goes awry around here https://github.com/nodejs/node/blame/24615bd409d148c9ef2d03d6706d0807d5df4557/lib/net.js#L1425 as there is only a string "127.0.0.1" - no object to destructure.

I think it is a newman problem because of the surprising way the lookup function is bound within the postman-runtime.

  1. Newman 5.3.2 + node v20.1.0
  2. OSX Ventura - Apple Silicon
  3. CLI installed via homebrew
  4. Recently appeared on my new mac
  5. Expected behaviour - it should resolve localhost to 127.0.0.1 and not throw an exception.
  6. newman run API.postman-collection.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions