webdriverio-community / wdio-video-reporter

Reporter for WebdriverIO that makes videos of failed tests and has optional allure integration

Home Page:https://webdriver.io/docs/wdio-video-reporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Observing "Cannot read property 'filter' of undefined" after adding video to reporters object

bkapadia01 opened this issue · comments

Describe the bug
After adding the video reporter to my wdio conf file the test do not run and I am faced with the following error.
ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot read property 'filter' of undefined

We are using running test on both an iOS app and on a website.
We have successfully added alurre reporter and cucumber to our framework and working as expected.
The current implementation for reporter in our wdio.conf.ts file is as follows:

    'spec',
    [video, {
      saveAllVideos: false,       // If true, also saves videos for successful test cases
      videoSlowdownMultiplier: 1, // Higher to get slower videos, lower for faster videos [Value 1-100]
    }],
    ['allure', {
      outputDir: '_results_/allure-raw',
      disableWebdriverStepsReporting: true,
      disableWebdriverScreenshotsReporting: true,
      useCucumberStepReporter: true
    }],
  ],

Log
Please set wdio.config.logLevel = 'debug', then post the whole file called wdio-0-0-video-reporter.log.
If it is very large, consider using a gist - http://gist.github.com.
no wdio-0-0-video-reporter log outputted but

[0-0]     at Video.onRunnerStart (/Users/username/dev/e2e-test-automation/node_modules/wdio-video-reporter/src/index.js:67:51)
[0-0]     at Video.<anonymous> (/Users/username/dev/e2e-test-automation/node_modules/@wdio/reporter/build/index.js:59:18)
[0-0]     at Video.emit (events.js:400:28)
[0-0]     at Video.emit (domain.js:470:12)
[0-0]     at /Users/username/dev/e2e-test-automation/node_modules/@wdio/runner/build/reporter.js:36:56
[0-0]     at Array.forEach (<anonymous>)
[0-0]     at BaseReporter.emit (/Users/username/dev/e2e-test-automation/node_modules/@wdio/runner/build/reporter.js:36:25)
[0-0]     at Runner.run (/Users/username/dev/e2e-test-automation/node_modules/@wdio/runner/build/index.js:113:24)
[0-0]     at processTicksAndRejections (internal/process/task_queues.js:95:5)

Expected behavior
Should not observe filter error after adding
Environment (please complete the following information):

  • wdio-video-reporter version: [e.g. 1.1.2]
  • WebdriverIO version: [e.g. 5.4.13]
  • Mode: [Standalone mode or WDIO Testrunner]
  • If WDIO Testrunner, running sync/async: [e.g. sync/async]
  • Node.js version: [e.g. 8.11.2]
  • NPM version: [e.g. 5.8.0]
  • Browser name and version: [e.g. Chrome 68]
  • Platform name and version: [e.g. Windows 10]

Desktop (please complete the following information):

  • OS: [Mac OS Big Sur 11.6.1]
  • Browser [chrome]
  • Version [99.0.4844.51]

Smartphone (please complete the following information):

  • Device: [iOS - iPad 9.7inch]
  • OS: [14.5]
  • Non-browser Application

@bkapadia01 Please check again now with latest version. This should be fixed as part of #72

Thanks for taking a stab at it @ajitesh11 .. will close for now but happy to re-open in case something is still incorrect.