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

Newman doesn't appear to be able to download Postman Collections in Node 12 #1991

Closed
deltamualpha opened this issue May 3, 2019 · 14 comments · Fixed by #2007 or #2679
Closed

Newman doesn't appear to be able to download Postman Collections in Node 12 #1991

deltamualpha opened this issue May 3, 2019 · 14 comments · Fixed by #2007 or #2679
Assignees
Labels

Comments

@deltamualpha
Copy link

deltamualpha commented May 3, 2019

  1. Newman Version (can be found via newman -v): 4.4.1
  2. OS details (type, version, and architecture): macOS 10.14.4; node 12.1.0
  3. Are you using Newman as a library, or via the CLI? CLI
  4. Did you encounter this recently, or has this bug always been there: New installation
  5. Expected behaviour: It runs a collection
  6. Command / script used to run Newman: newman run https://raw.githubusercontent.com/heremaps/postman-collections/master/weather.postman_collection
  7. Sample collection, and auxiliary files (minus the sensitive details):
  8. Screenshots (if applicable):

Node 12.1.0:

$ newman run https://raw.githubusercontent.com/heremaps/postman-collections/master/weather.postman_collection
newman: Newman v4 deprecates support for the v1 collection format
  Use the Postman Native app to export collections in the v2 format

newman

Weather API

→ Severe Weather Alerts
_tls_wrap.js:513
  self._destroySSL();
       ^

TypeError: Cannot read property '_destroySSL' of undefined
    at Timeout.destroySSL [as _onTimeout] (_tls_wrap.js:513:8)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

Node 10:

$ newman run https://raw.githubusercontent.com/heremaps/postman-collections/master/weather.postman_collection
newman: Newman v4 deprecates support for the v1 collection format
  Use the Postman Native app to export collections in the v2 format

newman

Weather API

→ Severe Weather Alerts
  GET https://weather.cit.api.here.com/weather/1.0/report.json?product=alerts&name=Chicago&app_id={{YOUR_APP_ID}}&app_code={{YOUR_APP_CODE}} [401 Unauthorized, 550B, 156ms]
... etc etc etc

Node 12:

$ newman run weather.postman_collection
newman: Newman v4 deprecates support for the v1 collection format
  Use the Postman Native app to export collections in the v2 format

newman

Weather API

→ Severe Weather Alerts
  GET https://weather.cit.api.here.com/weather/1.0/report.json?product=alerts&name=Chicago&app_id={{YOUR_APP_ID}}&app_code={{YOUR_APP_CODE}} [401 Unauthorized, 550B, 137ms]
... etc etc etc
@deltamualpha
Copy link
Author

(Original issue wasn't encountered with the weather collection, but it showcases identical behavior.)

@deltamualpha deltamualpha changed the title Newman doesn't appear to work in Node 12 Newman doesn't appear to be able to download Postman Collections in Node 12 May 3, 2019
@deltamualpha
Copy link
Author

Ah, running them from a local file succeeds.

@ousmaneNdiaye
Copy link

ousmaneNdiaye commented May 8, 2019

Since three days, all my Newman builds on CircleCi fail with the error 😭 :

       ^
TypeError: Cannot read property '_destroySSL' of undefined
    at Timeout.destroySSL [as _onTimeout] (_tls_wrap.js:513:8)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

On my setup the collection file is not donwloaded but already in the project (running the tests from local works fine).


I found a solution to fix it on CircleCi, sticking node to the lts version :

#.circleci/config.yml
version: 2.1
jobs:
    build:
        docker:
        - image: circleci/node:lts
[...]

@Exodus
Copy link

Exodus commented May 10, 2019

I'm having the same issue with the current latest version in homebrew:

node --version
v12.1.0

When running:

newman run https://api.getpostman.com/collections/<redacted>\?apikey\=<redacted> --environment https://api.getpostman.com/environments/<redacted>\?apikey\=<redacted>

Output:

_tls_wrap.js:513
  self._destroySSL();
       ^

TypeError: Cannot read property '_destroySSL' of undefined
    at Timeout.destroySSL [as _onTimeout] (_tls_wrap.js:513:8)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

Downgrading to the LTS version (v10.15.3) runs the collection without issue.

@shamasis
Copy link
Member

Yep. We are observing anomalies with Node12. @codenirvana - maybe we can put some of our observations updated here.

I suggest downgrading to node 11 / 10 - until we figure out what changed in 12.

@shamasis shamasis added the bug label May 10, 2019
@MauriceS
Copy link

I observed the same problem in Bitbucket Pipelines, Newman 4.4.1, and latest node image in Bitbucket Pipelines. It failed in the middle of the test (after 300 of 905 tests). Specifying Node 10.15 fixed the problem.

_tls_wrap.js:534
self._destroySSL();
^
TypeError: Cannot read property '_destroySSL' of undefined
at Timeout.destroySSL [as _onTimeout] (_tls_wrap.js:534:8)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)

@codenirvana
Copy link
Member

This is fixed in Newman v4.5.0

@juchom
Copy link

juchom commented May 21, 2019

Issue is still present in 4.5.0, my tests are working fine and then this exception appears:

TypeError: Cannot read property '_destroySSL' of undefined
    at Timeout.destroySSL [as _onTimeout] (_tls_wrap.js:534:8)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
PS C:\Users\Administrator> newman -v
4.5.0

@janniswarnat
Copy link

I am also still getting the error with newman 4.5.0 and Node version v12.2.0:

_tls_wrap.js:534
  self._destroySSL();
       ^

TypeError: Cannot read property '_destroySSL' of undefined
    at Timeout.destroySSL [as _onTimeout] (_tls_wrap.js:534:8)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

Not sure if this is relevant: In my case it comes up when querying a URL with a self-signed SSL certificate. Can this issue be re-opened or should @juchom or I open a fresh issue?

Best regards

Jannis

@shamasis
Copy link
Member

Are you facing issue while fetching collection from url or while running a collection that has this url? @codenirvana if @janniswarnat says it’s the latter, then let’s track that as a separate issue

@janniswarnat
Copy link

janniswarnat commented May 22, 2019

A test inside a local collection fails. I will try to reproduce the error with a minimal example and open a new issue.

@janniswarnat
Copy link

New issue has been created with info on how to reproduce:

#2015

Update to one of my comments: The error is not related to self-signed certificates.

@csvan
Copy link

csvan commented May 28, 2019

Confirming that downgrading from nodejs 12.2 to 10.15 solves this issue for me (see repro: #2015 (comment))

@testerncoder
Copy link

I am still getting the same issue while generating the URL via sharing collection:
newman: Newman v4 deprecates support for the v1 collection format
Use the Postman Native app to export collections in the v2 format

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