microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.77k stars 3.58k forks source link

[Bug]: WebKit / Linux support avif image format #32673

Open pinanks opened 2 days ago

pinanks commented 2 days ago

Version

1.47.1

Steps to reproduce

  1. Clone repo at https://github.com/pinanks/pw-img-webkit-linux
  2. Run ./generate-ss.sh

Expected behavior

render-with-cache-response-ss

Actual behavior

A blank screenshot

render-with-cache-response-ss

Additional context

I am trying to render HTML with assets such as CSS/images etc cached and using page.route to intercept and fulfill with cached response. Everything works fine on my local machine (Apple M3 Pro, OS: Sonoma 14.1, everything else is same) but it fails on a Linux container.

The issue is that the img is not rendered and I get a blank screenshot. I also tried to have base64 of image as src directly in the html but it didn't work as well.

The repro will generate two screenshots for both these cases.

Environment

System:
  OS: Docker image ubuntu:jammy
Binaries:
  Node: v20.17.0
  npm: v10.8.2
Playwright:
  @playwright/test: v1.47.1
mxschmitt commented 1 day ago

We currently compile our Linux builds without avif support - we'll look into enabling it.