playwright
playwright copied to clipboard
[BUG] "npx playwright" in vanilla v1.34.1/v1.33.0 container asks to install [email protected]
System info
- Playwright Version:
v1.34.1, v1.33.0 - Operating System:
Ubuntu Jammy - Browser:
All - Other info: This is a bug that affects the Docker image
mcr.microsoft.com/playwright:v1.33.0
Source code
- [x] I provided exact source code that allows reproducing the issue locally.
Steps
-
Run this to download the image and get a shell
docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.33.0 /bin/bash -
Try a simple playwright command inside the docker container
npx playwright --version
Expected
It prints Version 1.33.0 to stdout
i.e. do what the mcr.microsoft.com/playwright:v1.34.0 container does
Actual
It asks to install [email protected]
Need to install the following packages:
[email protected]
Ok to proceed? (y)
Updated because this bug also affects the v1.34.1 container
docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.34.1 /bin/bash
Pinning to 1.34.0 seems to be a workaround
@bamarch This is actually how it's supposed to work. Playwright's docker images do not have Playwright package pre-installed. Usually, you would checkout your project inside, and playwright will be installed as a part of npm install command. Then npx playwright --version and other commands will start working.
However, in the docker image v1.34.0 there was a bug, where playwright accidentally got into npx cache folder, and so npx playwright --version unexpectedly worked. Sorry for confusion!