<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.33]</li>
<li>Operating System: [amazon-ebs.ubuntu-focal-2004 (host) -&gt; Ubuntu 22.04.2 (docker image)]</li>
<li>Browser: [WebKit]</li>
<li>Other info:</li>
</ul>
<p dir="auto">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.</p>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>




<p dir="auto"><strong>Dockerfile</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# docker/playwright/Dockerfile
FROM mcr.microsoft.com/playwright:v1.33.0

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

ENTRYPOINT [&quot;npx&quot;, &quot;playwright&quot;]
CMD [&quot;-h&quot;]"><pre class="notranslate"><code class="notranslate"># 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"]
</code></pre></div>
<p dir="auto"><strong>docker-compose</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# docker-compose.yml
version: &quot;2.4&quot;
services:
  playwright:
    user: 1000:1000
    ipc: host
    working_dir: /app
    environment:
      APP_BASEURL: &quot;http://php-dev:80&quot;
    build:
      context: ./
      dockerfile: docker/playwright/Dockerfile
    volumes:
      - ./:/app"><pre class="notranslate"><code class="notranslate"># 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
</code></pre></div>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// 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;"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-s1">type</span> <span class="pl-kos">{</span> <span class="pl-v">PlaywrightTestConfig</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>

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

<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">config</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Test file (self-contained)</strong><br>
Does not matter as the browser does not start</p>
<p dir="auto"><strong>Steps</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ docker-compose run --rm --entrypoint '' playwright /bin/bash -c 'DEBUG=pw:browser npx playwright test --browser &quot;webkit&quot;'
Creating XXX ... done
Running 5 tests using 2 workers
[webkit] › xxx1.spec.ts:13:9 › test1
  pw:browser &lt;launching&gt; /ms-playwright/webkit-1837/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser &lt;launched&gt; pid=871 +16ms
[webkit] › xxx2.spec.ts:5:5 › test2
  pw:browser &lt;launching&gt; /ms-playwright/webkit-1837/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser &lt;launched&gt; pid=894"><pre class="notranslate"><code class="notranslate">$ 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 &lt;launching&gt; /ms-playwright/webkit-1837/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser &lt;launched&gt; pid=871 +16ms
[webkit] › xxx2.spec.ts:5:5 › test2
  pw:browser &lt;launching&gt; /ms-playwright/webkit-1837/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser &lt;launched&gt; pid=894
</code></pre></div>
<p dir="auto">At this poing it just hangs until the process gets killed manually.</p>
<p dir="auto"><strong>Expected</strong><br>
Browser starts and tests start executing</p>
<p dir="auto"><strong>Actual</strong><br>
Webkit hangs on lunch</p>
<h3 dir="auto">Workaround</h3>
<p dir="auto">Use <strong>Ubuntu 22</strong> to run the <strong>Ubuntu 22</strong> (jammy) container, then it works.<br>
Using Ubuntu 20 to run it, won't work and leads into this issue.<br>
Please upvote if you encounter this issue, this helps us to prioritise.</p>
<hr>
<p dir="auto"><strong>Context:</strong></p>
<ul dir="auto">
<li>Playwright Version: 1.23.0</li>
<li>Operating System: Linux</li>
<li>Python version: 3.10</li>
<li>Browser: Webkit</li>
</ul>
<p dir="auto"><strong>Code Snippet</strong><br>
pw.py</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="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__ == &quot;__main__&quot;:
    asyncio.run(run())"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">asyncio</span>
<span class="pl-k">from</span> <span class="pl-s1">playwright</span>.<span class="pl-s1">async_api</span> <span class="pl-k">import</span> <span class="pl-s1">async_playwright</span>


<span class="pl-k">async</span> <span class="pl-k">def</span> <span class="pl-en">run</span>():
    <span class="pl-k">async</span> <span class="pl-k">with</span> <span class="pl-en">async_playwright</span>() <span class="pl-k">as</span> <span class="pl-s1">playwright</span>:
        <span class="pl-k">await</span> <span class="pl-s1">playwright</span>.<span class="pl-s1">webkit</span>.<span class="pl-en">launch</span>(<span class="pl-s1">headless</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)

<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>:
    <span class="pl-s1">asyncio</span>.<span class="pl-en">run</span>(<span class="pl-en">run</span>())</pre></div>
<p dir="auto">Dockerfile</p>
<div class="highlight highlight-source-dockerfile notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="FROM snakepacker/python:3.10

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

ADD ./pw.py pw.py
CMD python3 pw.py"><pre class="notranslate"><span class="pl-k">FROM</span> snakepacker/python:3.10

<span class="pl-k">RUN</span> apt-install python3-pip &amp;&amp; \
    pip install playwright==1.23.0 &amp;&amp; \
    playwright install --with-deps webkit

<span class="pl-k">ADD</span> ./pw.py pw.py
<span class="pl-k">CMD</span> python3 pw.py</pre></div>
<p dir="auto"><strong>Describe the bug</strong></p>
<p dir="auto">playwright times out starting webkit</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="docker build -t test-pw . &amp;&amp; docker run test-pw"><pre class="notranslate">docker build -t test-pw <span class="pl-c1">.</span> <span class="pl-k">&amp;&amp;</span> docker run test-pw</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;//pw.py&quot;, line 11, in &lt;module&gt;
    asyncio.run(run())
  File &quot;/usr/lib/python3.10/asyncio/runners.py&quot;, line 44, in run
    return loop.run_until_complete(main)
  File &quot;/usr/lib/python3.10/asyncio/base_events.py&quot;, line 646, in run_until_complete
    return future.result()
  File &quot;//pw.py&quot;, line 8, in run
    await playwright.webkit.launch(headless=True)
  File &quot;/usr/local/lib/python3.10/dist-packages/playwright/async_api/_generated.py&quot;, line 11399, in launch
    await self._impl_obj.launch(
  File &quot;/usr/local/lib/python3.10/dist-packages/playwright/_impl/_browser_type.py&quot;, line 93, in launch
    Browser, from_channel(await self._channel.send(&quot;launch&quot;, params))
  File &quot;/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py&quot;, line 43, in send
    return await self._connection.wrap_api_call(
  File &quot;/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py&quot;, line 370, in _
    return await result
  File &quot;/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py&quot;, line 78, in inner_send
    result = next(iter(done)).result()
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
&lt;launching&gt; /root/.cache/ms-playwright/webkit-1668/pw_run.sh --inspector-pipe --headless --no-startup-window
&lt;launched&gt; pid=440
============================================================"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "//pw.py", line 11, in &lt;module&gt;
    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 ===========================
&lt;launching&gt; /root/.cache/ms-playwright/webkit-1668/pw_run.sh --inspector-pipe --headless --no-startup-window
&lt;launched&gt; pid=440
============================================================
</code></pre></div>