webdriverio-community / wdio-html-reporter

Fork of wdio-html-format-reporter
MIT License
18 stars 27 forks source link

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

Closed mannysah closed 3 years ago

mannysah commented 3 years ago

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.

vdrulerz commented 3 years ago

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.

vdrulerz commented 3 years ago

image

mannysah commented 3 years ago

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 3 years ago

closed as webdriverio issue