maciejmaciejewski / azure-pipelines-postman

MIT License
13 stars 9 forks source link

Exception #13

Open ehuggz opened 3 years ago

ehuggz commented 3 years ago

Getting this error when uploading report:

[warning]TypeError: Cannot read property '1' of null

at checkIfSuccessful (D:\a\_tasks\UploadPostmanHtmlReport_f5384bf0-1b5c-11ea-b0cc-5b064956a213\1.1.3\index.js:62:49)
at files.forEach.file (D:\a\_tasks\UploadPostmanHtmlReport_f5384bf0-1b5c-11ea-b0cc-5b064956a213\1.1.3\index.js:34:20)
at Array.forEach (<anonymous>)
at run (D:\a\_tasks\UploadPostmanHtmlReport_f5384bf0-1b5c-11ea-b0cc-5b064956a213\1.1.3\index.js:18:9)
at Object.<anonymous> (D:\a\_tasks\UploadPostmanHtmlReport_f5384bf0-1b5c-11ea-b0cc-5b064956a213\1.1.3\index.js:92:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Finishing: Upload Postman Html Report

I have tried supplying both folder and a folder/file and get the same issue. Last step in Postman Test Reporting in Azure DevOps. Almost there!

einhorneyal commented 3 years ago

hi,

in the Newman step configure the reporters to be htmlextra and others but without html

tlewers-evolve commented 3 years ago

I'M having the same issue. I dont really understand what @einhorneyal is saying any advice on fixing this would be great.

2021-08-24T20:04:48.8286897Z ##[section]Starting: Upload Postman Html Report 2021-08-24T20:04:48.8398481Z ============================================================================== 2021-08-24T20:04:48.8398776Z Task : Upload Postman HTML Report 2021-08-24T20:04:48.8398997Z Description : Upload Postman HTML Report 2021-08-24T20:04:48.8399207Z Version : 1.1.3 2021-08-24T20:04:48.8399388Z Author : Maciej Maciejewski 2021-08-24T20:04:48.8399663Z Help : https://github.com/maciejmaciejewski/azure-pipelines-postman#usage-examples 2021-08-24T20:04:48.8399974Z ============================================================================== 2021-08-24T20:04:54.9786483Z ##[warning]TypeError: Cannot read property '1' of null at checkIfSuccessful (D:\a_tasks\UploadPostmanHtmlReport_f5384bf0-1b5c-11ea-b0cc-5b064956a213\1.1.3\index.js:62:49) at files.forEach.file (D:\a_tasks\UploadPostmanHtmlReport_f5384bf0-1b5c-11ea-b0cc-5b064956a213\1.1.3\index.js:34:20) at Array.forEach () at run (D:\a_tasks\UploadPostmanHtmlReport_f5384bf0-1b5c-11ea-b0cc-5b064956a213\1.1.3\index.js:18:9) at Object. (D:\a_tasks\UploadPostmanHtmlReport_f5384bf0-1b5c-11ea-b0cc-5b064956a213\1.1.3\index.js:92:3) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) 2021-08-24T20:04:54.9846648Z ##[section]Finishing: Upload Postman Html Report

cristobal-buenrostro commented 2 years ago

any idea about this issue? I'm having the same error in azure devops pipeline. Or any place where I can find more detailed documentation?

SujoShalini commented 1 year ago

@tlewers-evolve @einhorneyal Could you please help me out if you resolved the issue? I am also facing the same issue.

paulbruzz commented 1 year ago

Having the same problem here! Does somebody have a solution or workaround? :(

fatalpuls3 commented 1 year ago

We are also experiencing the same issue. One interesting difference I was able to find was I set up a new pipeline literally with just the proper tasks in the stage to perform the postman tests, upload the html file and complete. This works fine but when I added the same stage to an existing pipeline I get this error. I have tried multiple things but have no resolution to the problem. I am willing to connect and assist in anyway helping resolve this problem.

Love this tool , please help us out.

RichardTrinh commented 2 months ago

If "Report Path" is configured to be "$(System.DefaultWorkingDirectory)", it will search for all html files within that folder and try to parse out the report. Only problem is, some people might have other HTML files in their folder and that will throw an exception. The workaround I found is to tell Newman to output the htmlextra report to another folder, and then have this task reference that folder in "Report Path".

In my Newman cli config: image

In my Upload Postman HTML Report config: image

Hope this helps others!