-
-
Notifications
You must be signed in to change notification settings - Fork 747
Description
When running CodeceptJS tests with the WebDriver
helper and restart: false
inside a Docker
container, tests never start execution. On a local runner (outside Docker), the same tests run fine
The problem appears to be with this line in codeceptjs/lib/helper/WebDriver.js
:
await this.browser.sessionSubscribe({ events: ['log.entryAdded'] })
If I comment out this line, the tests execute without issues.
This issue only happens inside Docker. On a local runner (outside Docker), the same tests run fine.
Minimal Reproducible Example:
Repo: https://github.com/myrepojuly/codecetpjssample
Steps to reproduce:
- Clone the repo above.
- Run
npx codeceptjs run --verbose
inside a Docker container with WebDriver helper and restart: false.
docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:134.0.6998.165-20250525
For Mac: docker run --platform linux/x86_64 -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:134.0.6998.165-20250525
- Observe that tests never execute.
- Comment out the sessionSubscribe line and rerun → tests pass.
Expected Behavior
Tests should execute correctly with restart: false inside Docker, same as on local runner.
Environment
CodeceptJS: 3.7.4
WebdriverIO: 9.15.0
Runner: Docker (Selenium container + CodeceptJS test runner)
Local machine: works fine
Notes:
Not sure what sessionSubscribe({ events: ['log.entryAdded'] })
is intended to do.