Promise rejection error when attachPicturesToLogs is enabled
Closed this issue · 4 comments
I'm not sure if this is the correct repo to report this issue. I'm using ReportPortal (v5.3.3) with @reportportal/agent-js-jasmine (v5.0.0) and I'm trying to get screenshots to work.
Describe the bug
Enabling "attachPicturesToLogs" property in the ReportportalAgent results in a "UnhandledPromiseRejectionWarning" when calling "agent.getExitPromise()".
Expected behavior
The report and screenshots are uploaded.
Desktop (please complete the following information):
- OS: Windows
- Browser: Chrome
- Version: chromedriver_87.0.4280.20
Additional context
Error: Item "c0dbb4ki65dcak" not found
at RPClient.finishTestItem (D:\FEA\Projects\ngx-dashboard\node_modules\@reportportal\client-javascript\lib\report-portal-client.js:508:53)
at D:\FEA\Projects\ngx-dashboard\node_modules\@reportportal\agent-js-jasmine\lib\jasmine-reportportal-reporter.js:345:55
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:14656) UnhandledPromiseRejectionWarning: Error: Item "c0dbb4ki65dcak" not found
at RPClient.sendLogWithoutFile (D:\FEA\Projects\ngx-dashboard\node_modules\@reportportal\client-javascript\lib\report-portal-client.js:593:53)
at RPClient.sendLog (D:\FEA\Projects\ngx-dashboard\node_modules\@reportportal\client-javascript\lib\report-portal-client.js:575:21)
at ReportportalReporter.sendLog (D:\FEA\Projects\ngx-dashboard\node_modules\@reportportal\agent-js-jasmine\lib\jasmine-reportportal-reporter.js:163:21)
at D:\FEA\Projects\ngx-dashboard\node_modules\@reportportal\agent-js-jasmine\lib\jasmine-reportportal-reporter.js:343:52
at Array.forEach (<anonymous>)
at D:\FEA\Projects\ngx-dashboard\node_modules\@reportportal\agent-js-jasmine\lib\jasmine-reportportal-reporter.js:343:32
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:14656) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 27)
If the body of cleanMap
is removed (so nothing is removed from the map), then the screenshots are uploaded and no errors are reported on the console. It seems like the logs are cleaned before they are uploaded.
Any advice on this issue?
Got the same issue :S
Task created!
@robot9706 When checking on version ReportPortal (v5.3.5) with @reportportal/agent-js-jasmine (v5.0.0), this problem was not reproduced. If this error still occurs with the latest version, please let us know.
I've moved from the company where we found this issue, so I unfortunately cannot test the newer version. But thank you for looking into it!