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

TypeError: Cannot read property '_destroySSL' of undefined #2015

Closed
janniswarnat opened this issue May 22, 2019 · 9 comments
Closed

TypeError: Cannot read property '_destroySSL' of undefined #2015

janniswarnat opened this issue May 22, 2019 · 9 comments
Assignees
Labels

Comments

@janniswarnat
Copy link

  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)

@csvan
Copy link

csvan commented May 25, 2019

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": []
    }
  ]
}

@csvan
Copy link

csvan commented May 25, 2019

FWIW this issue seems to have cropped up before, could be a regression: GoogleChrome/lighthouse#73

@csvan
Copy link

csvan commented May 27, 2019

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

@m3dbedb
Copy link

m3dbedb commented Sep 12, 2019

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

@lithqube
Copy link

lithqube commented Sep 18, 2019

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! frontend-workspace@2.0.0 newman: `newman run ./tools/api/mmc_api_collection.json --insecure`
npm ERR! Exit status 1
npm ERR! 

any update on this issue?

@codenirvana
Copy link
Member

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

@csvan
Copy link

csvan commented Sep 30, 2019

@codenirvana is there an ETA for the next release?

@codenirvana
Copy link
Member

@csvan Yes, this week! 🙂

@codenirvana
Copy link
Member

This has been fixed in Newman v4.5.5. 🎉

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

No branches or pull requests

5 participants