-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Safari/WebKit browser doesn't work in docker container (libsoup3 upgrade required) #23259
Comments
+1. Previously it used to work without any extra packages. Probably need to rebuild the docker image with
|
@sylhero @unickq I've tried the following and worked for me: $ docker run --rm -it mcr.microsoft.com/playwright:v1.34.2 /bin/bash
root@96e6aeada06b:/$ cd && npm init -y && npm i @playwright/test@1.34.2
root@96e6aeada06b:~$ cat <<'EOF' > a.mjs
import { webkit } from '@playwright/test';
const browser = await webkit.launch();
const page = await browser.newPage();
console.log(await page.evaluate(() => navigator.userAgent));
await browser.close();
EOF
root@96e6aeada06b:~$ node a.mjs
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15 We had the issue with the missing dependency, but it should be fixed with 1.34.2 docker image. |
@unickq @aslushnikov Thanks for looking into this issue! Yes, it works with other testcases and I have no problem with the docker image or test execution. The real problem for me is if I run the test on my local mac machine directly it works but when I execute the same test with the image it fails. I would like to understand why it happens or did I just find an edge case that breaks the test execution within the container? |
@aslushnikov I created the test repo with exactly the version you mentioned https://github.com/sylhero/playwright-bug/blob/main/Dockerfile#L1 and https://github.com/sylhero/playwright-bug/blob/main/sample/package.json#L11 and it's still not working |
@sylhero your test does fail for me on webkit. The reason it doesn't work is that the website fails to render due to some bad character: |
@aslushnikov so two things:
Besides that, if I just run the test directly on the local machine it all worked so without container, all browsers/tests passed. With container only Safari failed. |
I was able to reproduce and found out that this is a libsoup2 bug. Once we migrate to libsoup3 this is gonna be fixed. Assigning to me by that. |
@mxschmitt - so what is the workaround for now? Manually installing libsoup3 in the container? Is this going to be a fix to the |
There is unfortunately no workaround available as of today. We need to finish the libsoup3 migration on our side, which we hope to be able to complete with 1.36. But generally speaking we can't commit to any date. Thanks for your understanding. |
Merging this into the libsoup3 tracking bug: #22569 |
The issue persists in v1.37 |
@aslushnikov what version of playwright we can use? #22569 is still open and as someone mentioned above, v1.37 still has same issue. |
This issue is still open and isn't fixed yet. It's merged into #22569 |
@sylhero I was looking into your issue. The issue is that the It works in Chromium and WebKit (with libsoup3) because both accept Brotli as an encoding as well, so then the server will prefer Brotli and the server sends the response correctly when Brotli is accepted while our WebKit as of today (libsoup2.4) does not support Brotli. You can observe it by doing:
compared to e.g.:
The libsoup3 migration is almost done, so it will start working after #26596. |
This should make it into v1.38 and once its merged one day later it can be tested in [Playwright Canary](https://playwright.dev/docs/canary-releases). Fixes #22569 Fixes #23259
This should make it into v1.38 and once its merged one day later it can be tested in [Playwright Canary](https://playwright.dev/docs/canary-releases). Fixes microsoft#22569 Fixes microsoft#23259
System info
Source code
https://github.com/sylhero/playwright-bug
Link to the GitHub repository with the repro
[https://github.com/sylhero/playwright-bug]
Steps
Expected
it should work as running on the local
Actual
blank screen and timeout
The text was updated successfully, but these errors were encountered: