<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: 1.35.0</li>
<li>Operating System: Windows 11</li>
<li>Browser: Chromium</li>
<li>Other info:</li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
page.evaluate(async () =&gt; { console.log('should work') })"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">evaluate</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'should work'</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the code]</li>
</ul>
<p dir="auto"><strong>Expected</strong><br>
The function should output should work to console</p>
<p dir="auto">[Describe expected behavior]</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">There is a bug:<br>
page.evaluate: ReferenceError: fn is not defined</p>
<p dir="auto">More info:<br>
This actually worked before, now it doesn't work anymore. There might be recent changes that break the code.</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.32.1]</li>
<li>Operating System: [Ubuntu 20]</li>
<li>Browser: [WebKit]</li>
<li>Other info: Github Actions</li>
</ul>
<h3 dir="auto">Source code</h3>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { defineConfig, devices } from &quot;@playwright/test&quot;

// See https://playwright.dev/docs/test-configuration.
export default defineConfig({
    testDir: &quot;./e2e&quot;,
    // Maximum time one test can run for.
    timeout: 60 * 1000,
    // Global timeout for the whole test run.
    globalTimeout: 5 * 60 * 1000,
    expect: {
        // Maximum time expect() should wait for the condition to be met.
        // For example in `await expect(locator).toHaveText();`
        timeout: 1000,
    },
    // Run tests in files in parallel.
    fullyParallel: true,
    // Opt out of parallel tests on CI.
    workers: process.env.CI ? 1 : undefined,
    // Reporter to use. See https://playwright.dev/docs/test-reporters.
    reporter: process.env.CI ? &quot;github&quot; : &quot;html&quot;,
    // Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions.
    use: {
        // Timeout for each navigation action.
        navigationTimeout: 5 * 1000,
        // Maximum time each action such as `click()` can take.
        actionTimeout: 5 * 1000,
        // Base URL to use in actions like `await page.goto('/')`.
        baseURL: &quot;http://127.0.0.1:3000/&quot;,
        // Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer.
        trace: &quot;on-first-retry&quot;,
    },

    projects: [
        {
            name: &quot;chromium&quot;,
            use: { ...devices[&quot;Desktop Chrome&quot;] },
        },

        {
            name: &quot;webkit&quot;,
            use: { ...devices[&quot;Desktop Safari&quot;] },
        },
    ],

    // Folder for test artifacts such as screenshots, videos, traces, etc.
    outputDir: &quot;playwright-results&quot;,
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</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-c">// See https://playwright.dev/docs/test-configuration.</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
    <span class="pl-c1">testDir</span>: <span class="pl-s">"./e2e"</span><span class="pl-kos">,</span>
    <span class="pl-c">// Maximum time one test can run for.</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-c">// Global timeout for the whole test run.</span>
    <span class="pl-c1">globalTimeout</span>: <span class="pl-c1">5</span> <span class="pl-c1">*</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-c">// Maximum time expect() should wait for the condition to be met.</span>
        <span class="pl-c">// For example in `await expect(locator).toHaveText();`</span>
        <span class="pl-c1">timeout</span>: <span class="pl-c1">1000</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-c">// Run tests in files in parallel.</span>
    <span class="pl-c1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
    <span class="pl-c">// Opt out of parallel tests on CI.</span>
    <span class="pl-c1">workers</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">CI</span> ? <span class="pl-c1">1</span> : <span class="pl-c1">undefined</span><span class="pl-kos">,</span>
    <span class="pl-c">// Reporter to use. See https://playwright.dev/docs/test-reporters.</span>
    <span class="pl-c1">reporter</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">CI</span> ? <span class="pl-s">"github"</span> : <span class="pl-s">"html"</span><span class="pl-kos">,</span>
    <span class="pl-c">// Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions.</span>
    <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
        <span class="pl-c">// Timeout for each navigation action.</span>
        <span class="pl-c1">navigationTimeout</span>: <span class="pl-c1">5</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span>
        <span class="pl-c">// Maximum time each action such as `click()` can take.</span>
        <span class="pl-c1">actionTimeout</span>: <span class="pl-c1">5</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span>
        <span class="pl-c">// Base URL to use in actions like `await page.goto('/')`.</span>
        <span class="pl-c1">baseURL</span>: <span class="pl-s">"http://127.0.0.1:3000/"</span><span class="pl-kos">,</span>
        <span class="pl-c">// Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer.</span>
        <span class="pl-c1">trace</span>: <span class="pl-s">"on-first-retry"</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>

    <span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
        <span class="pl-kos">{</span>
            <span class="pl-c1">name</span>: <span class="pl-s">"chromium"</span><span class="pl-kos">,</span>
            <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">"Desktop Chrome"</span><span class="pl-kos">]</span> <span class="pl-kos">}</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">name</span>: <span class="pl-s">"webkit"</span><span class="pl-kos">,</span>
            <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">"Desktop Safari"</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-kos">]</span><span class="pl-kos">,</span>

    <span class="pl-c">// Folder for test artifacts such as screenshots, videos, traces, etc.</span>
    <span class="pl-c1">outputDir</span>: <span class="pl-s">"playwright-results"</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Running a test with this configuration on Github Actions (ubuntu latest) fails on the first <code class="notranslate">locator.fill:</code>: <code class="notranslate">TimeoutError: locator.fill: Timeout 5000ms exceeded.</code>. This is the debug output:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pw:browser [pid=14417] &lt;gracefully close start&gt; +4s
  pw:browser [pid=14417] &lt;process did exit: exitCode=0, signal=null&gt; +36ms
  pw:browser [pid=14417] starting temporary directories cleanup +3ms
  pw:browser [pid=14417] finished temporary directories cleanup +4ms
  pw:browser [pid=14417] &lt;gracefully close end&gt; +0ms
  pw:browser &lt;launching&gt; /home/runner/work/umani/umani/node_modules/.pnpm/playwright-core@1.32.1/node_modules/playwright-core/.local-browsers/webkit-1811/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser &lt;launched&gt; pid=[150](https://github.com/umani/umani/actions/runs/4526843935/jobs/7972265207?pr=1398#step:7:151)75 +22ms
  pw:browser [pid=15075][err] Could not determine the accessibility bus address +2s
  pw:browser [pid=15075] &lt;gracefully close start&gt; +9s
  pw:browser [pid=15075] &lt;process did exit: exitCode=0, signal=null&gt; +15ms
  pw:browser [pid=15075] starting temporary directories cleanup +0ms
  pw:browser [pid=15075] finished temporary directories cleanup +3ms"><pre class="notranslate">pw:browser [pid<span class="pl-k">=</span>14417] <span class="pl-k">&lt;</span>gracefully close start<span class="pl-k">&gt;</span> +4s
  pw:browser [pid<span class="pl-k">=</span>14417] <span class="pl-k">&lt;</span>process did exit: exitCode=0, signal=null<span class="pl-k">&gt;</span> +36ms
  pw:browser [pid<span class="pl-k">=</span>14417] starting temporary directories cleanup +3ms
  pw:browser [pid<span class="pl-k">=</span>14417] finished temporary directories cleanup +4ms
  pw:browser [pid<span class="pl-k">=</span>14417] <span class="pl-k">&lt;</span>gracefully close end<span class="pl-k">&gt;</span> +0ms
  pw:browser <span class="pl-k">&lt;</span>launching<span class="pl-k">&gt;</span> /home/runner/work/umani/umani/node_modules/.pnpm/playwright-core@1.32.1/node_modules/playwright-core/.local-browsers/webkit-1811/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser <span class="pl-k">&lt;</span>launched<span class="pl-k">&gt;</span> pid=[150](https://github.com/umani/umani/actions/runs/4526843935/jobs/7972265207<span class="pl-k">?</span>pr=1398#step:7:151)75 +22ms
  pw:browser [pid<span class="pl-k">=</span>15075][err] Could not determine the accessibility bus address +2s
  pw:browser [pid<span class="pl-k">=</span>15075] <span class="pl-k">&lt;</span>gracefully close start<span class="pl-k">&gt;</span> +9s
  pw:browser [pid<span class="pl-k">=</span>15075] <span class="pl-k">&lt;</span>process did exit: exitCode=0, signal=null<span class="pl-k">&gt;</span> +15ms
  pw:browser [pid<span class="pl-k">=</span>15075] starting temporary directories cleanup +0ms
  pw:browser [pid<span class="pl-k">=</span>15075] finished temporary directories cleanup +3ms</pre></div>