Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Error when trying `run-workers` with combination of `channel` using playwright helper.

オープン
#4,609 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js, playwright

調査の方向性

まず、Playwright helper、channel: 'msedge'、および win32 上で npx codeceptjs run-workers 2 を使用するデモ CodeceptJS プロジェクトで問題を再現します。run-workers の子プロセス環境の処理を調査し、並列実行中に channel ブラウザーが正常に起動することを確認します。

索引モデルが issue の本文から書いたものです。

説明

What are you trying to achieve?

When I use Playwright driver along with channel, and also use run-workers, I get error like the browser exe file is not present at specific location and browser cannot be launched.

How to reproduce?
  1. Create a demo codeceptjs project with playwright as driver.
  2. In codecept.conf.js file add the channel property inside playwright object (add any property from here) OR use below code.
const { setHeadlessWhen, setCommonPlugins } = require('@codeceptjs/configure');
// turn on headless mode when running with HEADLESS=true environment variable
// export HEADLESS=true && npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);

// enable all common plugins https://github.com/codeceptjs/configure#setcommonplugins
setCommonPlugins();

/** @type {CodeceptJS.MainConfig} */
exports.config = {
  tests: './*_test.js',
  output: './output',
  helpers: {
    Playwright: {
      browser: 'chromium',
      url: 'http://localhost',
      show: true,
      channel: 'msedge',
    }
  },
  include: {
    I: './steps_file.js'
  },
  name: 'demo-codecept'
}
Command for execution

npx codeceptjs run-workers 2

Possible resolution way and reason for Error

The error comes when child processes are created for the parallel execution using run-workers. For windows operating system, the env variable are case-insensitive, which means process.env['PROGRAMFILES(X86)'] and process.env['ProgramFiles(x86)'] would produce same output. But inside the child process, only writing exact case only produces result. ex. process.env['ProgramFiles(x86)'] will produce correct output and anything other produces undefined.
Because of this it is not able to find the correct path at which the browser exe files are present.

Details
  • CodeceptJS version: 3.6.6
  • NodeJS Version: 22.11.0
  • Operating System: win32
  • playwright: 1.49.0
主要言語
JavaScript
スター
4.2k
フォーク
756
平均マージ
2日 9時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeceptjs/CodeceptJS のほかの issue

codeceptjs/CodeceptJS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。