Issue 1:
System info

Playwright Version: 1.35.1

Operating System: GitHub Actions runner Ubuntu 22.04

Browser: Chromium 115.0.5790.24 (playwright build v1067)

Other info:

Mantine: 6.0.14

Source code

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

Config file

import {Config, defineConfig} from "@playwright/test";
import {dirname, join} from "node:path";
import {fileURLToPath} from "node:URL";

const __dirname = dirname(fileURLToPath(import.meta.url));
const CI = process.env.CI !== undefined;

const reportsPath = join(__dirname, "tests/playwright/reports");
const reporters: Config["reporter"] = [
[
"html",
{
open: "never",
outputFolder: join(reportsPath, "html")
}
],
["list"]

];

if (CI) {
reporters.push(["github"]);
}

export default defineConfig({
projects: [
{
name: "tests",
testDir: join(__dirname, "tests/playwright/tests"),
testMatch: "**/*.spec.ts"
}
],
outputDir: join(__dirname, "tests/playwright/output"),
use: {
video: "on",
trace: "on"
},
timeout: 1000 * 60 * 5,
//CI will be true
maxFailures: CI ? 1 : 0,
reporter: reporters,
retries: CI ? 2 : 0,
workers: CI ? 8 : 1
});

Test file (self-contained)

it('should check the box using setChecked', async ({ page }) => {
//...

/* Note that running with force: true seems to slightly decrease the frequency of the issue,
but it still occurs >50% of the time. The issue also occurs with the `.type` method (at about
the same frequency as the stock `.fill` method, like below). */
await page.getByLabel("Email").fill("beta@example.com");
await page.getByLabel("Password").first().fill("[REDACTED]");
await page.getByRole("button", {
name: /Log in|Sign up/
}).click();

//...
});

React Component

//Based on https://mantine.dev/form/use-form/#getinputprops
const form = useForm({
initialValues: {
email: "",
password: "",
confirmPassword: "",
terms: false
},
clearInputErrorOnChange: false,
validate: //Validation logic is ran immediately after any input
});

//...

<TextInput
{...form.getInputProps("email")}
icon={<IconMail />}
label="Email"
placeholder="example@example.com"
radius="md"
type="email"
withAsterisk
/>
<PasswordInput
icon={<IconKey />}
label="Password"
radius="md"
{...form.getInputProps("password")}
visibilityToggleIcon={visibilityToggle}
withAsterisk
/>

//...

Steps

Run the tests in GitHub Actions

Expected

Playwright reliably types into the input fields (See the screen recordings)

Actual

Playwright non-deterministically fails to type into the input fields and the test times out

Occurs <5% of the time on my computer (Also Ubuntu 22.04), even when I manually set CI to true or when I run in Act

Occurs >80% of the time in GitHub Actions

Does not consistently freeze up at the same place in the email/password input

Logs

locator.type: Target closed
=========================== logs ===========================
waiting for getByLabel('Email')
locator resolved to <input value="" type="email" aria-invalid="false" data-…/>
elementHandle.type("beta@example.com")
============================================================

Note: this is for fail-1, with type.

locator.fill: Target page, context or browser has been closed

Note: this is for fail-2 with fill.

locator.fill: Target closed
=========================== logs ===========================
waiting for getByLabel('Email')
locator resolved to <input value="" type="email" aria-invalid="false" data-…/>
elementHandle.fill("beta@example.com")
waiting for element to be visible, enabled and editable
forcing action
element is visible, enabled and editable
============================================================

Note: this is for fail-3, with force: true.

Screen Recordings

https://github.com/microsoft/playwright/assets/38930607/039da15f-4fb6-429b-91b0-426a41706f00 (Fail 1)

https://github.com/microsoft/playwright/assets/38930607/a6a76fa1-3a47-4d76-b9a6-b46e8e474158 (Fail 2)

https://github.com/microsoft/playwright/assets/38930607/f6b4a7a8-12d0-4764-bb40-86554a5b43cb (Fail 3)

https://github.com/microsoft/playwright/assets/38930607/5560b607-9708-455e-80a8-84ad9be2689f (Pass)

Issue 2:
Hi, in browser_patches/firefox/juggler/protocol/Protocol.js there is a duplicate of the property "value".

I believe that is redundant, is it correct? Thanks!