Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#4,609 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, node.js, playwright

Direzione di ricerca

Inizia riproducendo il problema in un progetto CodeceptJS di esempio usando l'helper Playwright, channel: 'msedge', e npx codeceptjs run-workers 2 su win32. Ispeziona la gestione dell'ambiente del processo figlio di run-workers e verifica che il browser channel venga avviato correttamente durante l'esecuzione parallela.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
JavaScript
Stelle
4.2k
Fork
756
Merge medio
2g 9h
PR unite (30g)
16

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codeceptjs/CodeceptJS

Tutte le issue di codeceptjs/CodeceptJS

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.