webdriverio-community/wdio-html-reporter

TypeError: Cannot set property 'failures' of undefined at HtmlReporter

Closed this issue · 4 comments

I get an error when i use HtmlReporter in my webdriverio config.

Here are the versions:

"@rpii/wdio-html-reporter": "^6.3.1",
"@wdio/appium-service": "^6.11.0",
"webdriverio": "^6.12.0",
"@wdio/cli": "^6.12.0",
"@wdio/jasmine-framework": "^6.11.0",
"@wdio/local-runner": "^6.12.0",
"@wdio/spec-reporter": "^6.11.0",
"@wdio/sync": "^6.11.0",

Error is:

[0-0] 2021-01-14T15:19:18.248Z ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot set property 'failures' of undefined at HtmlReporter.<anonymous> (<WORKSPACE>/node_modules/@wdio/reporter/build/index.js:153:32) at HtmlReporter.emit (events.js:315:20)

This error doesnt cause the execution to fail, however when there are other errors in codebase it doesn't show that error and outputs this error which makes debugging the actual issue very difficult.

I have faced this error too, it started happening ever since wdio introduced auto TS compiling feature...hence please take this up on priority so that it can be resolved sooner rather than later.

I am sure this would be occurring in wdio version 7 too which they are planning to roll out soon.

I did some research and added some notes on one of the issues(Closed) in webdriverio repo. I found out why this was happening. Here is the link to the issue.

rpii commented

closed as webdriverio issue