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 6.2.0 exception - node:internal/event_target:1090 process.nextTick(() => { throw err; }); #3267

Open
195858 opened this issue Aug 16, 2024 · 6 comments

Comments

@195858
Copy link

195858 commented Aug 16, 2024

  1. Newman Version (can be found via newman -v): 6.2.0
  2. OS details (type, version, and architecture): github workflow - ubuntu-latest - node 22.6
  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: Occured 2 hours ago, just after 6.2.0 was released (newman is installed and run run every 2 hours via github workflow)
  5. Expected behaviour: run newman successfully, no exceptions
  6. Command / script used to run Newman: newman run ${{ github.workspace }}/test/postman/DevPortal-APIM-Test.json --folder "EAP-List-Paging" --folder "EAP-Queries" --folder "EAP-Details" -e https://api.getpostman.com/environments/xxx?apikey=${{ secrets.POSTMAN_APIKEY }} -r htmlextra,cli --reporter-htmlextra-export ${{ github.workspace }}/${{ env.TEST_TEST_RUNNER_OUTPUT_DIR }}/postman-report.html --reporter-htmlextra-darkTheme --delay-request 100
  7. Sample collection, and auxiliary files (minus the sensitive details): not applicable
  8. Screenshots (if applicable): not applicable

The github workflow used to run successfully every two hours and started to fail upon release of 6.2.0 to NPM.

Now fails with

node:internal/event_target:1090
  process.nextTick(() => { throw err; });
                           ^
Error: global is not defined
    at lib/core/connect.js (node:internal/deps/undici/undici:2179:5)
    at __require (node:internal/deps/undici/undici:6:50)
    at lib/dispatcher/client.js (node:internal/deps/undici/undici:7246:26)
    at __require (node:internal/deps/undici/undici:6:50)
    at lib/dispatcher/pool.js (node:internal/deps/undici/undici:7750:18)
    at __require (node:internal/deps/undici/undici:6:50)
    at lib/dispatcher/agent.js (node:internal/deps/undici/undici:7833:16)
    at __require (node:internal/deps/undici/undici:6:50)
    at lib/global.js (node:internal/deps/undici/undici:7933:17)
    at __require (node:internal/deps/undici/undici:6:50)

After downgrading to 6.1.3 the workflow is operational again / error is not thrown.

Here's the relevant parts from the github workflow:

    jobs:
      regression_test:
        permissions:
          repository-projects: read
          contents: read
          id-token: write
        runs-on: ubuntu-latest
        strategy:
          max-parallel: 1
          matrix:
            node: ["22"]
        steps:
          - name: github-slug-action
            uses: rlespinasse/github-slug-action@v4.4.1
    
          - name: Checkout Current Branch
            uses: actions/checkout@master
            with:
              ref: ${{ github.ref }}
    
          - name: setup node
            uses: actions/setup-node@v3
            with:
              node-version: ${{ matrix.node }}
    
          - name: npm install
            run: |
              cd "${TEST_PLATFORM_DIR}"
              npm install
    
          - name: Create newman folder
            run: |
              mkdir -p /home/runner/work/newman
    
          - name: Install newman
            run: |
              npm install -g newman
              npm install -g newman-reporter-htmlextra
              npm install -g newman-reporter-cli-response
            working-directory: /home/runner/work/newman
    
          - name: Create Directory for test results
            run: mkdir -p ${{ github.workspace }}/${{ env.TEST_TEST_RUNNER_OUTPUT_DIR }}
          - name: Run POSTMAN collection
            run: |
              newman run ${{ github.workspace }}/test/postman/DevPortal-APIM-Test.json --folder "EAP-List-Paging" --folder "EAP-Queries" --folder "EAP-Details" -e https://api.getpostman.com/environments/xxx?apikey=${{ secrets.POSTMAN_APIKEY }} -r htmlextra,cli --reporter-htmlextra-export ${{ github.workspace }}/${{ env.TEST_TEST_RUNNER_OUTPUT_DIR }}/postman-report.html --reporter-htmlextra-darkTheme --delay-request 100
            working-directory: /home/runner/work/newman
    

@A1811-qbite
Copy link

A1811-qbite commented Aug 16, 2024

I'm story

@rahul-mereddy
Copy link

We are having issues with 6.2.0 version causing newman tests stuck.

Tested with 6.1.3 and able to pass the newman tests.

@appurva21
Copy link
Member

Hey folks! Thanks for reporting this. I can reproduce it on node v22.3.0 and above.

While we land a fix for this, as a workaround, you can downgrade your node version to v22.2.0 or below for running newman v6.2.0.

@A1811-qbite
Copy link

Alphawebplusalphabeta

@silverwind
Copy link

Was this fixed in 6.2.1? If so, please close.

@paulina-grunwald
Copy link

We are having issues with 6.2.0 version causing newman tests stuck.

Tested with 6.1.3 and able to pass the newman tests.

we have same problem

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

6 participants