Newman: TypeError: Cannot read property '_destroySSL' of undefined

Created on 22 May 2019  ยท  9Comments  ยท  Source: postmanlabs/newman

  1. Newman Version (can be found via newman -v):

4.5.0

  1. OS details (type, version, and architecture):

Debian GNU/Linux 9 (stretch)

  1. Are you using Newman as a library, or via the CLI?

CLI

  1. Did you encounter this recently, or has this bug always been there:

after upgrading to Node v12.3.0

  1. Expected behaviour:
warnat@vdi-debian09:~/reproduce_newman$ node --version
v10.15.3
warnat@vdi-debian09:~/reproduce_newman$ newman -v
4.5.0
warnat@vdi-debian09:~/reproduce_newman$ newman run postman_collection.json
newman

test_border_gateway

โ†’ auth-service password / linksmart / bgw-dev
  POST https://demo.linksmart.eu/auth/authorize [200 OK, 322B, 360ms]

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         โ”‚           executed โ”‚            failed โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚              iterations โ”‚                  1 โ”‚                 0 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                requests โ”‚                  1 โ”‚                 0 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚            test-scripts โ”‚                  1 โ”‚                 0 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚      prerequest-scripts โ”‚                  1 โ”‚                 0 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚              assertions โ”‚                  0 โ”‚                 0 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ total run duration: 455ms                                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ total data received: 83B (approx)                                โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ average response time: 360ms [min: 360ms, max: 360ms, s.d.: 0ยตs] โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  1. Command / script used to run Newman:

newman run postman_collection.json

  1. Sample collection, and auxiliary files (minus the sensitive details):

postman_collection.json:

{  
   "info":{  
      "_postman_id":"68fc1a13-a2be-4145-adc4-6088fe7b2fe1",
      "name":"test_border_gateway",
      "schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
   },
   "item":[  
      {  
         "name":"auth-service password / linksmart / bgw-dev",
         "request":{  
            "auth":{  
               "type":"basic",
               "basic":[  
                  {  
                     "key":"password",
                     "value":"secret",
                     "type":"string"
                  },
                  {  
                     "key":"username",
                     "value":"jannis",
                     "type":"string"
                  }
               ]
            },
            "method":"POST",
            "header":[  
               {  
                  "key":"Content-Type",
                  "name":"Content-Type",
                  "value":"application/json",
                  "type":"text"
               }
            ],
            "body":{  
               "mode":"raw",
               "raw":"{\n    \"rule\": \"MQTT/#\",\n    \"openidConnectProviderName\": \"linksmart\"\n}"
            },
            "url":{  
               "raw":"https://demo.linksmart.eu/auth/authorize",
               "host":[  
                  "https://demo.linksmart.eu"
               ],
               "path":[  
                  "auth",
                  "authorize"
               ]
            }
         },
         "response":[  

         ]
      }
   ],
   "event":[  
      {  
         "listen":"prerequest",
         "script":{  
            "id":"c63c7c9f-9130-4261-9fc0-9210fec49f46",
            "type":"text/javascript",
            "exec":[  
               ""
            ]
         }
      },
      {  
         "listen":"test",
         "script":{  
            "id":"380448ac-0ecf-47f7-98e2-afc0b15861aa",
            "type":"text/javascript",
            "exec":[  
               ""
            ]
         }
      }
   ]
}
  1. Screenshots (if applicable):

Reproduction:

warnat@vdi-debian09:~/reproduce_newman$ node --version
v12.3.0
warnat@vdi-debian09:~/reproduce_newman$ newman -v
4.5.0
warnat@vdi-debian09:~/reproduce_newman$ newman run postman_collection.json
newman

test_border_gateway

โ†’ auth-service password / linksmart / bgw-dev
  POST https://demo.linksmart.eu/auth/authorize [200 OK, 322B, 351ms]
_tls_wrap.js:546
  self._destroySSL();
       ^

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

bug

Most helpful comment

We've fixed this issue in our internal library and will be fixed in the next Newman release!

All 9 comments

Confirming this on OSX Mojave 10.4. Using Node 12.1 and newman 4.5

To reproduce, run newman with the following collection:

{
  "id": "117284f0-8840-483c-8bd3-af580a2d83bc",
  "name": "Marina Test",
  "description": "",
  "auth": null,
  "events": null,
  "variables": [],
  "order": [
    "4d604799-90d3-4e6c-a58b-6937d7ec3cf8"
  ],
  "folders_order": [],
  "folders": [],
  "requests": [
    {
      "id": "4d604799-90d3-4e6c-a58b-6937d7ec3cf8",
      "name": "google it",
      "url": "https://google.com",
      "description": "",
      "data": null,
      "dataMode": null,
      "headerData": [],
      "method": "GET",
      "pathVariableData": [],
      "queryParams": [],
      "auth": null,
      "events": [
        {
          "listen": "test",
          "script": {
            "id": "df632881-bdb2-4682-9625-36e60d295707",
            "exec": [
              "pm.test(\"Status code is 200\", function () {",
              "    pm.response.to.have.status(200);",
              "});"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "folder": null,
      "preRequestScript": null,
      "tests": "pm.test(\"Status code is 200\", function () {\n    pm.response.to.have.status(200);\n});",
      "currentHelper": null,
      "helperAttributes": null,
      "collectionId": "117284f0-8840-483c-8bd3-af580a2d83bc",
      "headers": "",
      "pathVariables": []
    }
  ]
}

FWIW this issue seems to have cropped up before, could be a regression: https://github.com/GoogleChrome/lighthouse/issues/73

Update: downgrading to node 10.15.3 solves this issue for me. Something seems to have changed in node 12.

Same issue under windows 7 64 bit node v 12.7.0 and newman v 4.5.3 npm 6.10.0

Newman 4.5.3 under windows 7 32 and node 8.11.4 works

Node: 12.10.0
OS: linux x64
Newman: 4.5.4
โ configuration / end2end / certificate-search-strategy
โ†ณ https://{{baseUrl}}:{{port}}/api/v1/config/certificate-search-strategy
_tls_wrap.js:547
  self._destroySSL();
       ^

TypeError: Cannot read property '_destroySSL' of undefined
    at Timeout.destroySSL [as _onTimeout] (_tls_wrap.js:547:8)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] newman: `newman run ./tools/api/mmc_api_collection.json --insecure`
npm ERR! Exit status 1
npm ERR! 

any update on this issue?

We've fixed this issue in our internal library and will be fixed in the next Newman release!

@codenirvana is there an ETA for the next release?

@csvan Yes, this week! ๐Ÿ™‚

This has been fixed in Newman v4.5.5. ๐ŸŽ‰

Was this page helpful?
0 / 5 - 0 ratings