playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[BUG] "npx playwright" in vanilla v1.34.1/v1.33.0 container asks to install [email protected]

Open bamarch opened this issue 2 years ago • 1 comments

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

image

Actual

It asks to install [email protected]

Need to install the following packages:
  [email protected]
Ok to proceed? (y)

image

bamarch avatar May 23 '23 15:05 bamarch

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

image

image

Pinning to 1.34.0 seems to be a workaround

bamarch avatar May 23 '23 15:05 bamarch

@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!

dgozman avatar May 24 '23 18:05 dgozman