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

Getting RangeError: Invalid array length when using htmlextra #442

Open
1 task done
emanzaman opened this issue Nov 21, 2024 · 1 comment
Open
1 task done

Getting RangeError: Invalid array length when using htmlextra #442

emanzaman opened this issue Nov 21, 2024 · 1 comment
Labels
state: needs-triage This issue needs to be triaged type: bug Something isn't working

Comments

@emanzaman
Copy link

emanzaman commented Nov 21, 2024

Is There An Existing Issue

What Are You Seeing

I am getting the following error when using htmlextra reporter with newman.
I have checked all the endpoints that newman collection hits return 200 http status code.
When the response size is ~139.05Mb, the htmlextra reporter throws the following error, on removing the specific request returning large data the report generates fine.

`node:buffer:1100
data[i] = this[i];
^

RangeError: Invalid array length
at Buffer.toJSON (node:buffer:1100:15)
at ~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/postman-collection/lib/collection/property-base.js:134:42
at ~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/lodash/lodash.js:928:11
at ~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/lodash/lodash.js:4967:15
at baseForOwn (~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/lodash/lodash.js:3032:24)
at ~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/lodash/lodash.js:4936:18
at baseReduce (~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/lodash/lodash.js:925:5)
at Function.reduce (~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/lodash/lodash.js:9749:14)
at PostmanResponse.toJSON (~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/postman-collection/lib/collection/property-base.js:120:18)
at Function.toJSON (~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/postman-collection/lib/collection/property-base.js:225:46)
at PostmanResponse.toJSON (~/.nvm/versions/node/v16.20.2/lib/node_modules/newman/node_modules/postman-collection/lib/collection/response.js:283:37)
at ~/.nvm/versions/node/v16.20.2/lib/node_modules/newman-reporter-htmlextra/lib/index.js:279:79
at ~/.nvm/versions/node/v16.20.2/lib/node_modules/newman-reporter-htmlextra/node_modules/lodash/lodash.js:13874:16
at arrayEach (~/.nvm/versions/node/v16.20.2/lib/node_modules/newman-reporter-htmlextra/node_modules/lodash/lodash.js:530:11)
at Function.transform (~/.nvm/versions/node/v16.20.2/lib/node_modules/newman-reporter-htmlextra/node_modules/lodash/lodash.js:13873:43)
at EventEmitter. (~/.nvm/versions/node/v16.20.2/lib/node_modules/newman-reporter-htmlextra/lib/index.js:260:28)`

Steps To Reproduce The Issue

  1. Run newman with htmlextra reporter.
  2. At the end, newman throws RangeError: Invalid array length if any of the requests return large amount of data (~139 MB)

Full Newman Command Or Node Script

newman run <collectionfile.json> --insecure -e <envfile.json> -r cli,htmlextra --reporter-htmlextra-export  "<outputfile.html>" --working-dir <workingdirPath>

HTMLEXTRA Version

1.23.1

Newman Version

6.2.1

Additional Context

No response

@emanzaman emanzaman added state: needs-triage This issue needs to be triaged type: bug Something isn't working labels Nov 21, 2024
Copy link

Hey @emanzaman: 👋 - Thanks for helping to make the reporter better by raising this ticket. I will take a look as soon as I can and get back to you. Cheers, Danny.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs-triage This issue needs to be triaged type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant