Skip to content

[🐛 Bug]: Stoping forerver in cli with message "DevTools listening on ws://127.0.0.1:65229/devtools/browser/..." when using wdio-video-reporter #11578

@Sunber2111

Description

@Sunber2111

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

lastest

Node.js Version

lastest

Mode

WDIO Testrunner

Which capabilities are you using?

{
browserName: 'chrome'
}

What happened?

When I add wdio-video-reporter the command line is stoping forerver with message "DevTools listening on ws on ws://127.0.0.1:65229/devtools/browser/34f09e16-ece7-47a4-ba8c-e7d799fc6771" like this picture below
image

I'm using typescript with wdio.conf.ts

import type { Options } from '@wdio/types'
const allure = require('allure-commandline')
const video = require('wdio-video-reporter');

export const config: Options.Testrunner = {
    runner: 'local',
    autoCompileOpts: {
        autoCompile: true,
        tsNodeOpts: {
            project: './tsconfig.json',
            transpileOnly: true
        }
    },
    specs: [
        './test/specs/SCL/Fixtures/fixture.ts'
    ],
    exclude: [
    ],
    maxInstances: 10,
    capabilities: [{
        browserName: 'chrome'
    }],
    logLevel: 'trace',
    bail: 0,
    baseUrl: 'http://localhost',
    waitforTimeout: 600000,
    connectionRetryTimeout: 120000,
    connectionRetryCount: 3,
    framework: 'mocha',
    outputDir: './allure-results',
    reporters: [
        [video, {
            saveAllVideos: true,       // If true, also saves videos for successful test cases
            videoSlowdownMultiplier: 3, // Higher to get slower videos, lower for faster videos [Value 1-100]
          }],
        ['allure', {
            outputDir: 'allure-results',
            disableWebdriverStepsReporting: true,
            disableWebdriverScreenshotsReporting: true,
          }],
      ],
    mochaOpts: {
        ui: 'bdd',
        timeout: 99999
    },
    afterTest: async function(test, context, { error, result, duration, passed, retries }) {
        if (error) {
            await browser.takeScreenshot();
        }
    },
    onComplete: function() {
        const reportError = new Error('Could not generate Allure report')
        const generation = allure(['generate', 'allure-results', '--clean'])
        return new Promise((resolve:any, reject) => {
            const generationTimeout = setTimeout(
                () => reject(reportError),
                5000)

            generation.on('exit', function(exitCode:any) {
                clearTimeout(generationTimeout)

                if (exitCode !== 0) {
                    return reject(reportError)
                }

                console.log('Allure report successfully generated')
                resolve()
            })
        })
    }
}

package.json below :

{
  "name": "my-new-project",
  "devDependencies": {
    "@wdio/allure-reporter": "^8.20.0",
    "@wdio/cli": "^8.20.5",
    "@wdio/local-runner": "^8.20.5",
    "@wdio/mocha-framework": "^8.20.3",
    "@wdio/spec-reporter": "^8.20.0",
    "allure-commandline": "^2.24.1",
    "ts-node": "^10.9.1",
    "typescript": "^5.2.2"
  },
  "scripts": {
    "wdio": "wdio run ./wdio.conf.ts"
  },
  "dependencies": {
    "wdio-video-reporter": "^4.0.0"
  }
}

What is your expected behavior?

should can run test normally

How to reproduce the bug.

  1. set up like package.json and wdio.conf.ts
  2. then run a specify test script
  3. watch at the command line cli

Relevant log output

2023-11-02T15:35:37.248Z INFO @wdio/cli:launcher: Run onPrepare hook
2023-11-02T15:35:37.249Z INFO @wdio/utils: Setting up browser driver for: chrome@stable
2023-11-02T15:35:37.250Z INFO @wdio/utils: Setting up browser binaries for: chrome@stable
2023-11-02T15:35:37.252Z INFO webdriver: Downloading Chromedriver v119.0.6045.106
2023-11-02T15:35:37.743Z WARN webdriver: Chromedriver v119.0.6045.106 don't exist, trying to find known good version...
2023-11-02T15:35:38.238Z INFO webdriver: Download of Chromedriver v119.0.6045.105 was successful
2023-11-02T15:35:38.240Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2023-11-02T15:35:38.241Z INFO @wdio/local-runner: Start worker 0-0 with arg: run,./wdio.conf.ts
2023-11-02T15:35:38.252Z DEBUG @wdio/local-runner: Send command run to worker with cid "0-0"

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions