Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot set property 'failures' of undefined #50

Open
barbaracabralbr opened this issue Dec 14, 2020 · 6 comments

Comments

@barbaracabralbr
Copy link

barbaracabralbr commented Dec 14, 2020

I'm having some errors when upgrade the version of frameworks to:
"@wdio/cli": "^6.10.9",
"@wdio/devtools-service": "^6.10.6",
"@wdio/junit-reporter": "^6.10.6",
"@wdio/local-runner": "^6.10.7",
"@wdio/mocha-framework": "^6.10.6",
"@wdio/spec-reporter": "^6.10.6",
"@wdio/sync": "^6.10.7",
"chromedriver": "^87.0.2",
"mocha": "^8.2.1",
"supertest": "^6.0.1",
"wdio-chromedriver-service": "^6.0.4",
"wdio-image-comparison-service": "^2.0.0",
"webdriverio": "^6.10.7",

exports.config = merge(config.config, {
  suites: {
    prodtests: [
      './test/wdio/specs/bi/prod/*.js'
    ],
    suite1,
    suite2,
    suite3,
  },
  services: [[TimelineService], ['devtools', {
    debuggerAddress: 'localhost:9222'
  }]],
  reporters: [['timeline', { outputDir: './test/wdio/reports/timeline' }]],

Captura de Tela 2020-12-14 às 13 12 17

@benzaremean
Copy link
Contributor

will have a look. Apologies Ive been very quiet

@amarbir22
Copy link

I have the same issue.
Cannot set property 'failures' of undefined
[0-0] 2021-01-27T15:59:08.567Z ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot set property 'failures' of undefined
at TimelineReporter. (/home/XXXX/develop/ui-automation-framework/node_modules/wdio-timeline-reporter/node_modules/@wdio/reporter/build/index.js:153:32)

This is only happening when I pass mochaOpts

npm run test -- --mochaOpts.grep='bene'

@niksw7
Copy link

niksw7 commented Jun 12, 2021

hi did anyone find the reason of this error.
i have seen this error coming when few tests of mine were skipped

2021-06-12T03:52:10.132Z ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot set property 'failures' of undefined
at TimelineReporter. (/Users/rockstar/workspace/my-tests/.yarn/cache/@wdio-reporter-npm-5.22.4-538a753901-19002ca03e.zip/node_modules/@wdio/reporter/build/index.js:153:32)

@p-saxena
Copy link

I am seeing this issue as well. Here is my console output.
`$ ./node_modules/.bin/wdio wdio.chrome.conf.js --mochaOpts.grep=@fast

Execution of 13 workers started at 2021-06-22T09:37:41.964Z

2021-06-22T09:37:41.966Z DEBUG @wdio/utils:initialiseServices: initialise custom service "TimelineService"
2021-06-22T09:37:41.967Z DEBUG @wdio/utils:initialiseServices: initialise service "chromedriver" as NPM package
2021-06-22T09:37:41.983Z INFO @wdio/cli:launcher: Run onPrepare hook
2021-06-22T09:37:41.986Z INFO chromedriver: Start Chromedriver (/Users/prateeksaxena/frontend-service/node_modules/chromedriver/lib/chromedriver/chromedriver) with args --whitelisted-ips= --port=9515 --url-base=/
2021-06-22T09:37:42.007Z INFO chromedriver: Starting ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430@{#429}) on port 9515
2021-06-22T09:37:42.007Z INFO chromedriver: All remote connections are allowed. Use an allowlist instead!
2021-06-22T09:37:42.007Z INFO chromedriver: Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
2021-06-22T09:37:42.008Z INFO chromedriver: ChromeDriver was started successfully.
2021-06-22T09:37:42.109Z DEBUG @wdio/cli:utils: Finished to run "onPrepare" hook in 126ms
2021-06-22T09:37:42.131Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2021-06-22T09:37:42.132Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2021-06-22T09:37:42.132Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2021-06-22T09:37:42.132Z DEBUG @wdio/cli:utils: Finished to run "onWorkerStart" hook in 0ms
2021-06-22T09:37:42.132Z DEBUG @wdio/cli:utils: Finished to run "onWorkerStart" hook in 0ms
2021-06-22T09:37:42.132Z DEBUG @wdio/cli:utils: Finished to run "onWorkerStart" hook in 0ms
2021-06-22T09:37:42.136Z INFO @wdio/local-runner: Start worker 0-0 with arg: wdio.chrome.conf.js,--mochaOpts.grep=@fast
2021-06-22T09:37:42.145Z INFO @wdio/local-runner: Start worker 0-1 with arg: wdio.chrome.conf.js,--mochaOpts.grep=@fast
2021-06-22T09:37:42.153Z INFO @wdio/local-runner: Start worker 0-2 with arg: wdio.chrome.conf.js,--mochaOpts.grep=@fast
[0-0] 2021-06-22T09:37:42.613Z INFO @wdio/local-runner: Run worker command: run
[0-1] 2021-06-22T09:37:42.619Z INFO @wdio/local-runner: Run worker command: run
[0-2] 2021-06-22T09:37:42.629Z INFO @wdio/local-runner: Run worker command: run
[0-0] 2021-06-22T09:37:42.824Z DEBUG @wdio/local-runner:utils: init remote session
[0-1] 2021-06-22T09:37:42.825Z DEBUG @wdio/local-runner:utils: init remote session
[0-1] 2021-06-22T09:37:42.829Z DEBUG @wdio/utils:initialiseServices: initialise custom service "TimelineService"
[0-0] 2021-06-22T09:37:42.829Z DEBUG @wdio/utils:initialiseServices: initialise custom service "TimelineService"
[0-0] 2021-06-22T09:37:42.829Z DEBUG @wdio/utils:initialiseServices: initialise service "chromedriver" as NPM package
[0-1] 2021-06-22T09:37:42.829Z DEBUG @wdio/utils:initialiseServices: initialise service "chromedriver" as NPM package
[0-2] 2021-06-22T09:37:42.841Z DEBUG @wdio/local-runner:utils: init remote session
[0-2] 2021-06-22T09:37:42.844Z DEBUG @wdio/utils:initialiseServices: initialise custom service "TimelineService"
[0-2] 2021-06-22T09:37:42.844Z DEBUG @wdio/utils:initialiseServices: initialise service "chromedriver" as NPM package
[0-0] 2021-06-22T09:37:43.015Z DEBUG @wdio/sync: Finished to run "beforeSession" hook in 0ms
[0-1] 2021-06-22T09:37:43.015Z DEBUG @wdio/sync: Finished to run "beforeSession" hook in 0ms
[0-2] 2021-06-22T09:37:43.015Z DEBUG @wdio/sync: Finished to run "beforeSession" hook in 0ms
[0-0] RUNNING in chrome - /ui-tests/specs/billing/pricing-package-checkout-it.spec.js
[0-0] 2021-06-22T09:37:45.672Z DEBUG @wdio/local-runner:utils: init remote session
[0-0] 2021-06-22T09:37:45.673Z INFO webdriver: Initiate new session using the WebDriver protocol
[0-0] 2021-06-22T09:37:45.675Z INFO webdriver: [POST] http://localhost:9515/session
[0-1] 2021-06-22T09:37:45.675Z ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot set property 'failures' of undefined
[0-1] at TimelineReporter. (/Users/prateeksaxena/frontend-service/node_modules/wdio-timeline-reporter/node_modules/@wdio/reporter/build/index.js:153:32)
[0-1] at TimelineReporter.emit (events.js:315:20)
[0-1] at TimelineReporter.EventEmitter.emit (domain.js:467:12)
[0-1] at /Users/prateeksaxena/frontend-service/node_modules/@wdio/runner/build/reporter.js:36:56
[0-1] at Array.forEach ()
[0-1] at BaseReporter.emit (/Users/prateeksaxena/frontend-service/node_modules/@wdio/runner/build/reporter.js:36:25)
[0-1] at Runner._shutdown (/Users/prateeksaxena/frontend-service/node_modules/@wdio/runner/build/index.js:292:24)
[0-1] at Runner.run (/Users/prateeksaxena/frontend-service/node_modules/@wdio/runner/build/index.js:85:25)
[0-1] at processTicksAndRejections (internal/process/task_queues.js:93:5)`

@megaspaz
Copy link

megaspaz commented Jul 9, 2022

@niksw7 From what I've seen through dealing with this, is that timeline has some kind of flaw dealing with tests that are skipped or tests that are not run because they're not a part of tests to be run because they're not tagged to be run. The wdio log files for features of such types that aren't aren't part of the suite to be run is just the error seen using wdio cucumber packages 7.16.+. Latest wdio packages just swallow the error. Either way the flaw is still there, where cucumber has all the scenarios returning passing runs (result of 0 return code) while after going through timeline, the return/exit code will be changed to 1. Not much can be done with this as this project seems dead, unless someone wants to fork it or something. It kind of stinks because the replacement reporter I use for having something that you can just click on without having to start a server like allure, html-nice, depends on timeline... the aggregator no workie... but at least you can still get a report, albeit, without aggregation and prettiness...

@nair-sumesh
Copy link

nair-sumesh commented Feb 15, 2023

Reproducible with cucumber tags.

wdio -- --cucumberOpts.tagExpression='@sanity'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants