question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WDIO-CLI: Could not find job

See original GitHub issue

[//]: # NOTE: This repository only maintains packages that are listed in the Readme. Please make sure that your issue is directly caused by one of these packages and if not file an issue in the correct 3rd party package repository.

Environment (please complete the following information):

  • WebdriverIO version: 7.0.9
  • Mode: WDIO Testrunner
  • If WDIO Testrunner, running sync/async: sync
  • Node.js version: 12
  • NPM version: 6.14.9
  • Browser name and version: Chrome 87 Config of WebdriverIO An example of how you configured WebdriverIO config

Describe the bug When I run cucumber test with specific tags, all my feature files will be parsed to check if tags is present. If not, spec files are SKIPPED. After upgrading to wdio7, we have the same behavior, but my job will fail before parsing all files with exception:

/home/circleci/project/e2e_jt_tests/node_modules/@wdio/cli/build/interface.js:142 throw new Error('Could not find job'); ^ Error: Could not find job at WDIOCLInterface.clearJob (/home/circleci/project/e2e_jt_tests/node_modules/@wdio/cli/build/interface.js:142:19) at WDIOCLInterface.emit (events.js:314:20) at WDIOCLInterface.EventEmitter.emit (domain.js:483:12) at Launcher.endHandler (/home/circleci/project/e2e_jt_tests/node_modules/@wdio/cli/build/launcher.js:356:28) at WorkerInstance.emit (events.js:314:20) at WorkerInstance.EventEmitter.emit (domain.js:483:12) at WorkerInstance._handleExit (/home/circleci/project/e2e_jt_tests/node_modules/@wdio/local-runner/build/worker.js:128:14) at ChildProcess.emit (events.js:314:20) at ChildProcess.EventEmitter.emit (domain.js:483:12) at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

Tests are running on CircleCI with maxInstance 30. Before upgrading to wdio7, no issues, tests were skipped until finding a test to run. Now, It seems that if every executor find a skipped test, job is failing with exception.

Issue seems to happen in interface.js file from @wdio/cli

clearJob({ cid, passed, retries }) { const job = this._jobs.get(cid); this._jobs.delete(cid); const retryAttempts = this._specFileRetries - retries; const retry = !passed && retries > 0; if (!retry) { this.result.finished++; } if (job && job.hasTests === false) { return this.onSpecSkip(cid, job); } if (!job) { throw new Error('Could not find job'); }

I don’t have a local project to reproduce as it only happens with parallel execution on the CI 😕 But I was wondering if the part of code is new on wdio7? And how should we interpret it ?

This is my cucumberOpts to run my tests:

cucumberOpts: { require: ['src/step-definitions/**/*.js'], // <string[]> (file/dir) require files before executing features backtrace: false, // <boolean> show full backtrace for errors compiler: [], // <string[]> ("extension:module") require files with the given EXTENSION after requiring MODULE (repeatable) dryRun: false, // <boolean> invoke formatters without executing steps failFast: false, // <boolean> abort the run on first failure format: ['pretty'], // <string[]> (type[:path]) specify the output format, optionally supply PATH to redirect formatter output (repeatable) colors: true, // <boolean> disable colors in formatter output snippets: true, // <boolean> hide step definition snippets for pending steps source: true, // <boolean> hide source uris profile: [], // <string[]> (name) specify the profile to use strict: false, // <boolean> fail if there are any undefined or pending steps tagExpression: CUCUMBER_TAGS ?(${DEFAULT_CUCUMBER_TAGS}) and (${CUCUMBER_TAGS}) : DEFAULT_CUCUMBER_TAGS, // <string> (expression) // only execute the features or scenarios with tags matching the expression timeout: CUCUMBER_STEPS_TIMEOUT, // <number> timeout for step definitions ignoreUndefinedDefinitions: false, // <boolean> Enable this config to treat undefined definitions as warnings. scenarioLevelReporter: false, // Enable this to make webdriver.io behave as if scenarios and not steps were the tests. },

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
christian-bromanncommented, Mar 22, 2021

@osmolyar has also mentioned that in the Gitter channel. She is creating an issue for it. We can release a fix for it tomorrow.

0reactions
christian-bromanncommented, Mar 31, 2022

@rejieshr this is a pretty old issue, please update all your WebdriverIO dependencies and retry.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error installing webdriverIO using "npm install wdio"
This is something related to the latest version of NodeJS which is explained here. I would advise you below two options to get...
Read more >
webdriverio/webdriverio - Gitter
Now, that issue is gone (I guess it was because I wrote username instead of user) but a new error is coming: ERROR:...
Read more >
T231305 error while trying to run wdio tests
if I start a chromedriver instance on that URL, I get this error: ➜ ContentTranslation git:(firstSeleniumTest) ✗ node_modules/webdriverio/bin/wdio tests/ ...
Read more >
Testrunner - WebdriverIO
It is suppose to do all the work for you, allows integrate to 3rd party ... To see the command line interface help,...
Read more >
@wdio/cli - npm
WebdriverIO testrunner command line interface. Latest version: 8.0.13, last published: 11 days ago. Start using @wdio/cli in your project by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found