System info
- Playwright Version: [v1.35.1]
- Operating System: [All]
- Browser: [All]
Source code
Link to the GitHub repository with the repro
Steps
- Clone this repo and using your shell of choice navigate to the root of the repo.
- Execute
npm start. This will build and run an angular app.
- Once the angular app is running, execute
npm test
When running with node 16.19.1 the output after step 3 is:
> demo-app@0.0.0 test
> npx playwright test
Running 1 test using 1 worker
✓ 1 [chromium] › example.spec.ts:3:5 › dummy test (1.8s)
1 passed (2.6s)
When running with node 18.16.0 the output after step 3 is:
> demo-app@0.0.0 test
> npx playwright test
[WebServer] ? Port 4200 is already in use.
Would you like to use a different port? (Y/n) [WebServer]
Error: Timed out waiting 30000ms from config.webServer.
As you can see, it tries to execute the webServer.command and then eventually times out because the port is already taken.
Expected
When running on node 18.16.0 it should NOT try to execute the webServer.command when webServer.reuseExistingServer is set to true.
Actual
When running on node 18.16.0 it executes the webServer.command when webServer.reuseExistingServer is set to true.
Other
I used nvm to swap between node versions whilst testing this.
System info
Source code
Link to the GitHub repository with the repro
Steps
npm start. This will build and run an angular app.npm testWhen running with node
16.19.1the output afterstep 3is:When running with node
18.16.0the output afterstep 3is:As you can see, it tries to execute the
webServer.commandand then eventually times out because the port is already taken.Expected
When running on node
18.16.0it should NOT try to execute thewebServer.commandwhenwebServer.reuseExistingServeris set to true.Actual
When running on node
18.16.0it executes thewebServer.commandwhenwebServer.reuseExistingServeris set to true.Other
I used nvm to swap between node versions whilst testing this.