Issue 1:
System info

Playwright Version: v1.32.3

Operating System: 22.04.2 LTS (Jammy Jellyfish)

Browser: WebKit

Node.js Version: v18.15.0

Source code

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

app.js

const playwright = require('playwright');

async function captureScreenshot() {
const options = {
headless: true,
viewport: { width: 1920, height: 1080 }
}
const browser = await playwright.webkit.launch(options);
const context = await browser.newContext();
const page = await context.newPage();

await page.goto('https://fonts.google.com/specimen/Montserrat');
await page.waitForLoadState('networkidle');
await page.screenshot({path: `ss-headless-webkit-montserrat.png`, fullPage: true});
await browser.close();
}

captureScreenshot();

Steps

node app.js

Expected

Actual

Context

My use case is to capture screenshots on different browsers.

It works perfectly fine on my local setup (details given below) for all the browsers i.e chromium, firefox and webkit. But it doesn't work on Ubuntu specifically for webkit, works fine for chromium and firefox. (Ubuntu runs on the Docker image mcr.microsoft.com/playwright:v1.32.3-jammy. However, I also tried it on a live machine, it produces the same screenshots as the container)

The issue seems to be font rendering. Webkit on Ubuntu can't render different weights of the font

macOS (Local setup)

Playwright Version: v1.32.3

Operating System: Ventura Version 13.3.1

Browser: WebKit

Node.js Version: v18.15.0

Similar Issues

#16104, #7441, #2626

Issue 2:
System info

Playwright Version: [v1.32.2]

Operating System: [macOS BigSur]

Browser: [Chrome 112.0.5615.121]

Other info:

Source code

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

Link to the GitHub repository with the repro

Config file

export default defineConfig({
testDir: './tests',
/* Maximum time one test can run for. */
timeout: 600 * 1000,
globalTimeout: 1000 * 60 * 30,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 10000,
},
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [['html', { open: 'always', port: process.env.NODE_SERVICE_PORT || '9103', host: 'local.webullbroker.com' }]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},

/* Configure projects for major browsers */
projects: [
{ name: 'setup', testMatch: /.*\.setup\.ts/ },
{
name: 'chromium',
testMatch: 'List.spec.ts',
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/user.json',
},
dependencies: ['setup'],
},
],

/* Folder for test artifacts such as screenshots, videos, traces, etc. */
// outputDir: 'test-results/',

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// port: 3000,
// },
})

Steps

[Run the test]

[Click Traces Image]

Expected

[html reporter success open]

Actual

It cannot be accessed by domain name or reverse proxy, but it can be accessed by localhost or 127.0.0.1

Error：

caught (in promise) TypeError: Cannot read properties of undefined (reading 'register')
at index.a18c30b0.js:1:3355
at index.a18c30b0.js:1:3586
(anonymous) @ index.a18c30b0.js:1
(anonymous) @ index.a18c30b0.js:1