Issue 1:
System info

Playwright Version: [v1.33]

Operating System: [amazon-ebs.ubuntu-focal-2004 (host) -> Ubuntu 22.04.2 (docker image)]

Browser: [WebKit]

Other info:

I'm using your docker image (see below) which works fine locally using Ubuntu 22.04 as host but it constantly fails since 1.33 on jenkins agent which is running on AWS t3.large using amazon-ebs.ubuntu-focal-2004.

Source code

I provided exact source code that allows reproducing the issue locally.

Dockerfile

# docker/playwright/Dockerfile
FROM mcr.microsoft.com/playwright:v1.33.0

ENV HOME=/home/pwuser
RUN chmod -R 777 /home/pwuser

ENTRYPOINT ["npx", "playwright"]
CMD ["-h"]

docker-compose

# docker-compose.yml
version: "2.4"
services:
playwright:
user: 1000:1000
ipc: host
working_dir: /app
environment:
APP_BASEURL: "http://php-dev:80"
build:
context: ./
dockerfile: docker/playwright/Dockerfile
volumes:
- ./:/app

Config file

// playwright.config.ts
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';

const config: PlaywrightTestConfig = {
testDir: './playwright',
timeout: 60 * 1000,
expect: {
timeout: 5000
},
fullyParallel: true,
forbidOnly: false,
retries: 3,
workers: require('os').cpus().length,
reporter:[ ['html', { open: 'never', outputFolder: './var/playwright-report' }] ],
use: {
actionTimeout: 0,
baseURL: process.env.APP_BASEURL ?? 'http://php-dev:80',
extraHTTPHeaders: {
'X-Debug': '0', // Disable symfony debug toolbar (profiler)
},
trace: 'on',
video: 'on-first-retry',
launchOptions: {
slowMo: 300
}
},
outputDir: './var/playwright-artifacts',
};

export default config;

Test file (self-contained)

Does not matter as the browser does not start

Steps

$ docker-compose run --rm --entrypoint '' playwright /bin/bash -c 'DEBUG=pw:browser npx playwright test --browser "webkit"'
Creating XXX ... done
Running 5 tests using 2 workers
[webkit] › xxx1.spec.ts:13:9 › test1
pw:browser <launching> /ms-playwright/webkit-1837/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
pw:browser <launched> pid=871 +16ms
[webkit] › xxx2.spec.ts:5:5 › test2
pw:browser <launching> /ms-playwright/webkit-1837/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
pw:browser <launched> pid=894

At this poing it just hangs until the process gets killed manually.

Expected

Browser starts and tests start executing

Actual

Webkit hangs on lunch

Issue 2:
Workaround

Use Ubuntu 22 to run the Ubuntu 22 (jammy) container, then it works.

Using Ubuntu 20 to run it, won't work and leads into this issue.

Please upvote if you encounter this issue, this helps us to prioritise.

Context:

Playwright Version: 1.23.0

Operating System: Linux

Python version: 3.10

Browser: Webkit

Code Snippet

pw.py

import asyncio
from playwright.async_api import async_playwright

async def run():
async with async_playwright() as playwright:
await playwright.webkit.launch(headless=True)

if __name__ == "__main__":
asyncio.run(run())

Dockerfile

FROM snakepacker/python:3.10

RUN apt-install python3-pip && \
pip install playwright==1.23.0 && \
playwright install --with-deps webkit

ADD ./pw.py pw.py
CMD python3 pw.py

Describe the bug

playwright times out starting webkit

docker build -t test-pw . && docker run test-pw

Traceback (most recent call last):
File "//pw.py", line 11, in <module>
asyncio.run(run())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "//pw.py", line 8, in run
await playwright.webkit.launch(headless=True)
File "/usr/local/lib/python3.10/dist-packages/playwright/async_api/_generated.py", line 11399, in launch
await self._impl_obj.launch(
File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_browser_type.py", line 93, in launch
Browser, from_channel(await self._channel.send("launch", params))
File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py", line 43, in send
return await self._connection.wrap_api_call(
File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py", line 370, in _
return await result
File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py", line 78, in inner_send
result = next(iter(done)).result()
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
<launching> /root/.cache/ms-playwright/webkit-1668/pw_run.sh --inspector-pipe --headless --no-startup-window
<launched> pid=440
============================================================