webdriverio: [šŸ› Bug]: Suddenly all of my scripts being stopped executing</h1> <div class="body"><h3>Have you read the Contributing Guidelines on issues?</h3> <ul> <li><input checked disabled type="checkbox"> I have read the <a href="https://github.com/webdriverio/webdriverio/blob/main/CONTRIBUTING.md#reporting-new-issues">Contributing Guidelines on issues</a>.</li> </ul> <h3>WebdriverIO Version</h3> <p>9.12.3</p> <h3>Node.js Version</h3> <p>22.13.1</p> <h3>Mode</h3> <p>WDIO Testrunner</p> <h3>Which capabilities are you using?</h3> <pre><code class="language-typescript"> </code></pre> <h3>What happened?</h3> <p>everyth9ing fails with below errror</p> <p>025-06-12T14:25:35.719Z INFO <a href="https://github.com/orgs/wdio/teams/local-runner">@wdio/local-runner</a>: Run worker command: run 2025-06-12T14:25:36.172Z DEBUG <a href="https://github.com/orgs/wdio/teams/runner">@wdio/runner</a>: init remote session 2025-06-12T14:25:36.180Z DEBUG <a href="https://github.com/orgs/wdio/teams/utils">@wdio/utils</a>:initializeServices: initialize service ā€œsauceā€ as NPM package 2025-06-12T14:25:37.891Z DEBUG <a href="https://github.com/orgs/wdio/teams/utils">@wdio/utils</a>:initializeServices: initialize service ā€œinterceptā€ as NPM package 2025-06-12T14:25:37.917Z DEBUG <a href="https://github.com/orgs/wdio/teams/utils">@wdio/utils</a>:initializeServices: initialize service ā€œsauceā€ as NPM package 2025-06-12T14:25:37.925Z DEBUG <a href="https://github.com/orgs/wdio/teams/utils">@wdio/utils</a>:initializeServices: initialize service ā€œsauceā€ as NPM package 2025-06-12T14:25:37.935Z DEBUG <a href="https://github.com/orgs/wdio/teams/utils">@wdio/utils</a>:shim: Finished to run ā€œbeforeSessionā€ hook in 0ms 2025-06-12T14:25:38.312Z ERROR <a href="https://github.com/orgs/wdio/teams/local-runner">@wdio/local-runner</a>: Failed launching test session: Error: Couldn’t initialize ā€œ<a href="https://github.com/orgs/wdio/teams/cucumber-framework">@wdio/cucumber-framework</a>ā€. TypeError: (0 , class_transformer_1.Type) is not a function at <anonymous> (C:\ui\wdio\node_modules@cucumber\cucumber\node_modules@cucumber\messages\src\messages.ts:14:8) at Object.<anonymous> (C:\ui\wdio\node_modules@cucumber\cucumber\node_modules@cucumber\messages\src\messages.ts:4:1) at loadCJSModule (node:internal/modules/esm/translators:161:3) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:7) at ModuleJob.runSync (node:internal/modules/esm/module_job:258:17) at require (node:internal/modules/esm/translators:146:9) at Object.<anonymous> (C:\ui\wdio\node_modules@cucumber\cucumber\node_modules@cucumber\messages\src\parseEnvelope.ts:1:1) at loadCJSModule (node:internal/modules/esm/translators:161:3) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:7) at ModuleJob.runSync (node:internal/modules/esm/module_job:258:17) at safeImport (C:\ui\wdio\node_modules@wdio\utils\build\index.js:292:11) at async initializePlugin (C:\ui\wdio\node_modules@wdio\utils\build\index.js:485:24) at async #initFramework (file:///C:/ui/wdio/node_modules/@wdio/runner/build/index.js:776:26) at async Runner.run (file:///C:/ui/wdio/node_modules/@wdio/runner/build/index.js:694:23)</p> <h3>What is your expected behavior?</h3> <p><em>No response</em></p> <h3>How to reproduce the bug.</h3> <p>xyz</p> <h3>Relevant log output</h3> <pre><code class="language-typescript">2025-06-12T14:53:43.549Z INFO @wdio/local-runner: Run worker command: run 2025-06-12T14:53:43.972Z DEBUG @wdio/runner: init remote session 2025-06-12T14:53:43.980Z DEBUG @wdio/utils:initializeServices: initialize service "sauce" as NPM package 2025-06-12T14:53:45.937Z DEBUG @wdio/utils:initializeServices: initialize service "intercept" as NPM package 2025-06-12T14:53:45.970Z DEBUG @wdio/utils:initializeServices: initialize service "sauce" as NPM package 2025-06-12T14:53:45.974Z DEBUG @wdio/utils:initializeServices: initialize service "sauce" as NPM package 2025-06-12T14:53:45.985Z DEBUG @wdio/utils:shim: Finished to run "beforeSession" hook in 0ms 2025-06-12T14:53:46.373Z ERROR @wdio/local-runner: Failed launching test session: Error: Couldn't initialize "@wdio/cucumber-framework". TypeError: (0 , class_transformer_1.Type) is not a function at <anonymous> (C:\ui\wdio\node_modules\@cucumber\cucumber\node_modules\@cucumber\messages\src\messages.ts:14:8) at Object.<anonymous> (C:\ui\wdio\node_modules\@cucumber\cucumber\node_modules\@cucumber\messages\src\messages.ts:4:1) at loadCJSModule (node:internal/modules/esm/translators:161:3) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:7) at ModuleJob.runSync (node:internal/modules/esm/module_job:258:17) at require (node:internal/modules/esm/translators:146:9) at Object.<anonymous> (C:\ui\wdio\node_modules\@cucumber\cucumber\node_modules\@cucumber\messages\src\parseEnvelope.ts:1:1) at loadCJSModule (node:internal/modules/esm/translators:161:3) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:7) at ModuleJob.runSync (node:internal/modules/esm/module_job:258:17) at safeImport (C:\ui\wdio\node_modules\@wdio\utils\build\index.js:292:11) at async initializePlugin (C:\ui\wdio\node_modules\@wdio\utils\build\index.js:485:24) at async #initFramework (file:///C:/ui/wdio/node_modules/@wdio/runner/build/index.js:776:26) at async Runner.run (file:///C:/ui/wdio/node_modules/@wdio/runner/build/index.js:694:23) </code></pre> <h3>Code of Conduct</h3> <ul> <li><input checked disabled type="checkbox"> I agree to follow this project’s Code of Conduct</li> </ul> <h3>Is there an existing issue for this?</h3> <ul> <li><input checked disabled type="checkbox"> I have searched the existing issues</li> </ul> </div> </section> <section class="issueAnalyticsMobile" id="analytics"> <h2>About this issue</h2> <ul> <li><a href="https://github.com/webdriverio/webdriverio/issues/14564" rel="nofollow">Original URL</a></li> <li>State: closed</li> <li>Created a year ago</li> <li>Reactions: 3</li> <li>Comments: 24 (5 by maintainers)</li> </ul> </section><section class="issueComments" id="topComments"> <h2>Most upvoted comments</h2> <div class="comments"> <div class="comment" key="0"> <div class="commentBody"><p>The issue lies in some different peer dependency that received some update and due to semantic versioning is causing builds to fail. Immediate workaround to unblock yourself will be to use an old package-lock.json which worked earlier or if you have a shrink wrap file, use that.</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+4</span> </div> <div class="attribution"> <a href="https://github.com/mainak-basu22" rel="nofollow">mainak-basu22</a> on <a href="https://github.com/webdriverio/webdriverio/issues/14564#issuecomment-2967739144" rel="nofollow">Jun 12, 2025</a> </div> </div> </div><div class="comment" key="1"> <div class="commentBody"><p>For what it is worth, all of our tests started to have issues and we tracked it down to a tsx upgrade being pulled in by one of our WebdriverIO dependencies. Many others started reporting issues and they have since reverted the changes: <a href="https://github.com/privatenumber/tsx/issues/727">https://github.com/privatenumber/tsx/issues/727</a></p> <p>The timing lines up perfectly for what is being reported here, and since the WebdriverIO package.json is using ^ we were all getting this broken tsx, and are now getting the fixed tsx.</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+2</span> </div> <div class="attribution"> <a href="https://github.com/james-Bullhorn" rel="nofollow">james-Bullhorn</a> on <a href="https://github.com/webdriverio/webdriverio/issues/14564#issuecomment-2977148061" rel="nofollow">Jun 16, 2025</a> </div> </div> </div><div class="comment" key="2"> <div class="commentBody"><p>In case this helps, I wonder if it is related to the release of v8 stuff with this release <a href="https://github.com/webdriverio/webdriverio/releases/tag/v8.45.0">https://github.com/webdriverio/webdriverio/releases/tag/v8.45.0</a> . The timing matches the errors, right?</p> <p>In our case, things started fail because we had a testing setup without a lock file, so it took the latest deps and we wrongly still were using the <code>devtools</code> stuff (which is still on v8 because not supported anymore) with the rest of wdio v9 pakcages, so part of the conflict came from that. However, after removing the <code>devtools</code> stuff, we also had that <code>cucumber</code> related error, so something else along the internal deps also broke. In our case we just added a lockfile with older deps to avoid the error.</p> <p>Can’t really share a repro build as the setup is complicated to extract, sorry for that.</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+2</span> </div> <div class="attribution"> <a href="https://github.com/jomi-se" rel="nofollow">jomi-se</a> on <a href="https://github.com/webdriverio/webdriverio/issues/14564#issuecomment-2969575964" rel="nofollow">Jun 13, 2025</a> </div> </div> </div><div class="comment" key="3"> <div class="commentBody"><blockquote> <blockquote> <p>[0-0] TypeError: (0 , debug_1.default) is not a function [0-0] at Object. (c:_Work\Project_automation\TestAutomation\node_modules\puppeteer-core\node_modules\proxy-agent\src\index.ts:13:26)</p> </blockquote> <p>Looking at the error this seems to be related to a dependency of puppeteer. There is obviously no workaround. The best thing you can do is to investigate this issue and investigate if there is a fix we can implement in WebdriverIO. Propose a fix and I am happy to merge and release it.</p> </blockquote> <p>I still doubt that because the puppeteer error shows up only when you have chromedriver or devtools as a service, if we remove the services , then for me its showing up ā€œcucumberā€ related error Couldn’t initialize ā€œ<a href="https://github.com/orgs/wdio/teams/cucumber-framework">@wdio/cucumber-framework</a>ā€. TypeError: (0 , class_transformer_1.Type) is not a function</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+1</span> </div> <div class="attribution"> <a href="https://github.com/Vinodkomeershetty" rel="nofollow">Vinodkomeershetty</a> on <a href="https://github.com/webdriverio/webdriverio/issues/14564#issuecomment-2967729558" rel="nofollow">Jun 12, 2025</a> </div> </div> </div><div class="comment" key="4"> <div class="commentBody"><p>I recommend to look into your <code>node_modules</code> directory directly to see where the import fails. See the stack trace:</p> <blockquote> <p>[0-0] TypeError: (0 , debug_1.default) is not a function [0-0] at Object. (c:_Work\Project_automation\TestAutomation\node_modules\puppeteer-core\node_modules\proxy-agent\src\index.ts:13:26)</p> </blockquote> <p>So some package, either Puppeteer or proxy agent import the <code>debug</code> package with a wrong version.</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+1</span> </div> <div class="attribution"> <a href="https://github.com/christian-bromann" rel="nofollow">christian-bromann</a> on <a href="https://github.com/webdriverio/webdriverio/issues/14564#issuecomment-2967727312" rel="nofollow">Jun 12, 2025</a> </div> </div> </div><div class="comment" key="5"> <div class="commentBody"><p>I assume this happened due to a release in Cucumber that has downstream breaking changes.</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+1</span> </div> <div class="attribution"> <a href="https://github.com/christian-bromann" rel="nofollow">christian-bromann</a> on <a href="https://github.com/webdriverio/webdriverio/issues/14564#issuecomment-2967520193" rel="nofollow">Jun 12, 2025</a> </div> </div> </div><div class="comment" key="6"> <div class="commentBody"><p><a href="https://github.com/Vinodkomeershetty">@Vinodkomeershetty</a> Here i’ve initialized a new wdio - cucumber project and I have the error from the description</p> <pre><code>Execution of 1 workers started at 2025-06-12T15:59:48.225Z 2025-06-12T15:59:48.237Z INFO @wdio/cli:launcher: Run onPrepare hook 2025-06-12T15:59:48.238Z INFO @wdio/utils: Setting up browser driver for: chrome@stable 2025-06-12T15:59:48.239Z INFO @wdio/utils: Setting up browser binaries for: chrome@stable 2025-06-12T15:59:48.241Z INFO webdriver: Using Chromedriver v137.0.7151.104 from cache directory C:\Users\vitec\AppData\Local\Temp 2025-06-12T15:59:48.244Z INFO @wdio/cli:launcher: Run onWorkerStart hook 2025-06-12T15:59:48.245Z INFO @wdio/local-runner: Start worker 0-0 with arg: run wdio.conf.js [0-0] 2025-06-12T15:59:50.479Z INFO @wdio/local-runner: Run worker command: run [0-0] 2025-06-12T15:59:50.631Z ERROR @wdio/local-runner: Failed launching test session: Error: Couldn't initialize "@wdio/cucumber-framework". [0-0] TypeError: (0 , class_transformer_1.Type) is not a function [0-0] at <anonymous> (C:\_Work\automation\test\test-project\node_modules\@cucumber\messages\src\messages.ts:14:8) [0-0] at Object.<anonymous> (C:\_Work\automation\test\test-project\node_modules\@cucumber\messages\src\messages.ts:4:1) [0-0] at loadCJSModule (node:internal/modules/esm/translators:164:3) [0-0] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:200:7) [0-0] at ModuleJob.runSync (node:internal/modules/esm/module_job:261:35) [0-0] at require (node:internal/modules/esm/translators:149:9) [0-0] at Object.<anonymous> (C:\_Work\automation\test\test-project\node_modules\@cucumber\messages\src\parseEnvelope.ts:1:1) [0-0] at loadCJSModule (node:internal/modules/esm/translators:164:3) [0-0] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:200:7) [0-0] at ModuleJob.runSync (node:internal/modules/esm/module_job:261:35) [0-0] at safeImport (C:\_Work\automation\test\test-project\node_modules\@wdio\utils\build\index.js:292:11) [0-0] at async initializePlugin (C:\_Work\automation\test\test-project\node_modules\@wdio\utils\build\index.js:485:24) [0-0] at async #initFramework (file:///C:/_Work/automation/test/test-project/node_modules/@wdio/runner/build/index.js:776:26) [0-0] at async Runner.run (file:///C:/_Work/automation/test/test-project/node_modules/@wdio/runner/build/index.js:694:23) [0-0] FAILED 2025-06-12T15:59:50.672Z INFO @wdio/cli:launcher: Run onWorkerEnd hook Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:02 </code></pre> <p>And here is my original error related to ā€œ<a href="https://github.com/orgs/wdio/teams/devtools-service">@wdio/devtools-service</a>ā€. Yesterday it was working perfectly fine, today suddenly all tests fail locally and in CI</p> <pre><code>Execution of 1 workers started at 2025-06-12T16:02:04.548Z 2025-06-12T16:02:05.305Z INFO @wdio/cli:launcher: Run onPrepare hook 2025-06-12T16:02:05.310Z INFO @wdio/utils: Setting up browser driver for: chrome@134.0.6998.165 2025-06-12T16:02:05.311Z INFO @wdio/utils: Setting up browser binaries for: chrome@134.0.6998.165 2025-06-12T16:02:05.345Z INFO webdriver: Using Chromedriver v134.0.6998.165 from cache directory C:\Users\vitec\AppData\Local\Temp 2025-06-12T16:02:05.808Z INFO webdriver: Setting up chrome v134.0.6998.165 2025-06-12T16:02:05.912Z INFO @wdio/cli:launcher: Run onWorkerStart hook 2025-06-12T16:02:05.913Z INFO @wdio/local-runner: Start worker 0-0 with arg: wdio.conf.azure.js --tags=TEST [0-0] 2025-06-12T16:02:08.029Z INFO @wdio/local-runner: Run worker command: run [0-0] 2025-06-12T16:02:11.540Z ERROR @wdio/local-runner: Failed launching test session: Error: Failed to initialise service unknown: Error: Couldn't initialize "@wdio/devtools-service". [0-0] TypeError: Cannot read properties of undefined (reading 'FileCoverage') [0-0] at Object.<anonymous> (C:\_Work\automation\ETP-TestAutomation\node_modules\istanbul-lib-instrument\src\source-coverage.js:25:38) [0-0] at loadCJSModule (node:internal/modules/esm/translators:164:3) [0-0] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:200:7) [0-0] at ModuleJob.runSync (node:internal/modules/esm/module_job:261:35) [0-0] at require (node:internal/modules/esm/translators:149:9) [0-0] at Object.<anonymous> (C:\_Work\automation\ETP-TestAutomation\node_modules\istanbul-lib-instrument\src\visitor.js:4:28) [0-0] at loadCJSModule (node:internal/modules/esm/translators:164:3) [0-0] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:200:7) [0-0] at ModuleJob.runSync (node:internal/modules/esm/module_job:261:35) [0-0] at require (node:internal/modules/esm/translators:149:9) [0-0] at Object.<anonymous> (C:\_Work\automation\ETP-TestAutomation\node_modules\istanbul-lib-instrument\src\instrumenter.js:7:24) [0-0] at loadCJSModule (node:internal/modules/esm/translators:164:3) [0-0] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:200:7) [0-0] at ModuleJob.runSync (node:internal/modules/esm/module_job:261:35) [0-0] at require (node:internal/modules/esm/translators:149:9) [0-0] at Object.<anonymous> (C:\_Work\automation\ETP-TestAutomation\node_modules\istanbul-lib-instrument\src\index.js:2:22) [0-0] at safeImport (C:\_Work\automation\ETP-TestAutomation\node_modules\@wdio\utils\build\index.js:278:11) [0-0] at async initializePlugin (C:\_Work\automation\ETP-TestAutomation\node_modules\@wdio\utils\build\index.js:471:24) [0-0] at async initializeServices (C:\_Work\automation\ETP-TestAutomation\node_modules\@wdio\utils\build\index.js:517:21) [0-0] at async initializeWorkerService (C:\_Work\automation\ETP-TestAutomation\node_modules\@wdio\utils\build\index.js:560:22) [0-0] at async Runner.run (file:///C:/_Work/automation/ETP-TestAutomation/node_modules/@wdio/runner/build/index.js:682:6) [0-0] at initializeWorkerService (C:\_Work\automation\ETP-TestAutomation\node_modules\@wdio\utils\build\index.js:576:11) [0-0] at async Runner.run (file:///C:/_Work/_automation/ETP-TestAutomation/node_modules/@wdio/runner/build/index.js:682:6) [0-0] FAILED 2025-06-12T16:02:11.578Z INFO @wdio/cli:launcher: Run onWorkerEnd hook Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:07 </code></pre> <p>So I fight with these error whole day and still no luck. It happened not only to me, but, as I said, in CI as well and for all team mates as well(after node-modules reinstallation)</p> </div> <div class="commentMetadata"> <div class="reactions"> <span>+1</span> </div> <div class="attribution"> <a href="https://github.com/vitecz" rel="nofollow">vitecz</a> on <a href="https://github.com/webdriverio/webdriverio/issues/14564#issuecomment-2967423234" rel="nofollow">Jun 12, 2025</a> </div> </div> </div> </div> <div class="moreComments"> <a href="https://github.com/webdriverio/webdriverio/issues/14564" rel="nofollow">Read more comments on GitHub</a> </div> </section><section class="issueNavigation"> <div class="back"> <a href="https://errorism.dev/issues/webdriverio-webdriverio--bug-throw-meaningful-error-if-isclickable-method-is-called-in-native-context"> ← webdriverio: [šŸ› Bug]: Throw meaningful error if .isClickable() Method is called in native context </a> </div> <div class="forward"> <a href="https://errorism.dev/issues/webdriverio-webdriverio--bug-ts-page-class-is-imported-as-js-and-failing-test-when-updating-the-import"> webdriverio: [šŸ› Bug]: ts page class is imported as .js and failing test when updating the import → </a> </div> </section> </div> <aside class="sidebar"> <div class="tocWrapper"> <span class="tocTitle">Table of contents</span> <a class="tocItem" href="#issueDescription">Issue description</a> <a class="tocItem" href="#topComments">Top comments</a> </div> <div class="analyticsWrapper"> <span class="analyticsTitle">About this issue</span> <a class="analyticsItem" href="https://github.com/webdriverio/webdriverio/issues/14564" rel="nofollow">Original URL</a> <span class="analyticsItem">State: closed</span> <span class="analyticsItem">Created a year ago</span> <span class="analyticsItem">Reactions: 3</span> <span class="analyticsItem">Comments: 24 (5 by maintainers)</span> </div> </aside> </div> </main> <!--<footer class="footerContainer">--> <!-- <div class="footerContent">--> <!-- <div class="footerLinks">--> <!-- <a class="footerLink" href="/about">About Errorism</a>--> <!-- <a class="footerLink" href="/privacy-policy">Privacy Policy</a>--> <!-- <a class="footerLink" href="/contact">Contact</a>--> <!-- </div>--> <!-- </div>--> <!--</footer>--> </div> </body></html>