Issue 1:
System info

Playwright Version: 1.35.0

Operating System: Windows 11

Browser: Chromium

Other info:

// playwright.config.ts
page.evaluate(async () => { console.log('should work') })

Steps

[Run the code]

Expected

The function should output should work to console

[Describe expected behavior]

Actual

There is a bug:

page.evaluate: ReferenceError: fn is not defined

More info:

This actually worked before, now it doesn't work anymore. There might be recent changes that break the code.

Issue 2:
System info

Playwright Version: [v1.32.1]

Operating System: [Ubuntu 20]

Browser: [WebKit]

Other info: Github Actions

Source code

Config file

import { defineConfig, devices } from "@playwright/test"

// See https://playwright.dev/docs/test-configuration.
export default defineConfig({
testDir: "./e2e",
// 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 ? "github" : "html",
// 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: "http://127.0.0.1:3000/",
// Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer.
trace: "on-first-retry",
},

projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},

{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
],

// Folder for test artifacts such as screenshots, videos, traces, etc.
outputDir: "playwright-results",
}

Running a test with this configuration on Github Actions (ubuntu latest) fails on the first locator.fill:: TimeoutError: locator.fill: Timeout 5000ms exceeded.. This is the debug output:

pw:browser [pid=14417] <gracefully close start> +4s
pw:browser [pid=14417] <process did exit: exitCode=0, signal=null> +36ms
pw:browser [pid=14417] starting temporary directories cleanup +3ms
pw:browser [pid=14417] finished temporary directories cleanup +4ms
pw:browser [pid=14417] <gracefully close end> +0ms
pw:browser <launching> /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 <launched> 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] <gracefully close start> +9s
pw:browser [pid=15075] <process did exit: exitCode=0, signal=null> +15ms
pw:browser [pid=15075] starting temporary directories cleanup +0ms
pw:browser [pid=15075] finished temporary directories cleanup +3ms