A HTML reporter for Postman's Command Line Runner, Newman. Includes Non Aggregated Runs broken down by Iterations, Skipped Tests, Console Logs and the handlebars helpers module for better custom templates.
Apache License 2.0
357
stars
139
forks
source link
Getting RangeError: Invalid array length when using htmlextra #442
[X] I have searched the issue tracker for similar problems.
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
Run newman with htmlextra reporter.
At the end, newman throws RangeError: Invalid array length if any of the requests return large amount of data (~139 MB)
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.
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
Full Newman Command Or Node Script
HTMLEXTRA Version
1.23.1
Newman Version
6.2.1
Additional Context
No response