Skip to content

mazgi-showcase/202211.playwright-webkit-hangs-on-ubuntu-22.04-on-20.04

Repository files navigation

Demo: Playwright WebKit Hangs on Ubuntu 22.04 Container on Ubuntu 20.04 Host

start-stop-playwright
☝️ Is the action didn't successful? JUST AS PLANNED 🌚

WebKit will hang in the specific combination if you use WebKit with Playwright, Docker, and Ubuntu.
This repository is a demo repository for that behavior.
Please check the results of GitHub Actions.

Host Ubuntu Docker Base Ubuntu Does WebKit Work?
20.04 20.04 ✅ Yes
20.04 22.04 🚫 No
22.04 20.04 ✅ Yes
22.04 22.04 ✅ Yes

See also microsoft/playwright#15764

How to Use

Docker and Docker Compose are needed, that's all.

How to Run on Your Local

Step 1: Write out your IDs and information in the .env file

ℹ️ If you are using Linux, write out UID and GID into the .env file to let that as exported on Docker Compose as environment variables.

test $(uname -s) = 'Linux' && {
  echo -e "GID=$(id -g)"
  echo -e "UID=$(id -u)"
} >> .env || :

Step 2: Start services via Docker Compose

You start Docker Compose services/containers as below.

docker compose up webkit-driver-u22.04-n18

Now you are able to run the test as below.

docker compose exec webkit-driver-u22.04-n18 npm run test