-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
playwright: 1.27.1 -> 1.31.1 #214939
playwright: 1.27.1 -> 1.31.1 #214939
Conversation
@ofborg build playwright playwright.passthru.tests |
|
Can someone on x86_64-darwin please support to figure out what is going on here? |
When using this, I get errors for webkit:
And firefox:
Tested with |
NixOS x86_64: the only browser that works for me is |
playwright defines all it's browsers with their revision / version in this file: https://github.com/microsoft/playwright/blob/e6f83f5b945783067d9bf5cb89cf023bc926478e/packages/playwright-core/browsers.json The nix derivation for linux constructs a folder that mimics the one The playwright project maintains several patches here. It is worth exploring whether once applied to the derivation in At least in the current { pkgs ? import <nixpkgs> {}
}:
pkgs.mkShell {
name = "playwright-environment";
buildInputs = [
pkgs.playwright
];
shellHook = ''
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="true"
export PLAYWRIGHT_BROWSERS_PATH="${pkgs.playwright.browsers}"
export PLAYWRIGHT_BROWSERS_VERSION="${pkgs.playwright.version}"
'';
} For |
We cannot realistically apply them because they are gigantic blobs and unmanageable unless we pin the exact browser version from upstream and then we can also download their blob. |
I agree. For the record, it might be possible to extract the information from here, but this is still no guarantee that the result will work as expected. Accordingly we should remove firefox from the derivation and only enable chromium as this is the only browser that currently works. Still - I have no idea what the situation on darwin is as the derivation looks completely different. @SuperSandro2000 have you tested your initial work on darwin? |
I have removed |
1e0a937
to
d436cbc
Compare
Sorry for taking so long to review this… |
Last time I checked they had one gigantic patch file, instead of multipler smaller ones we could more easily apply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rebase. I don't really have a strong opinion about the changes. Should be alright.
d436cbc
to
6226a3b
Compare
I have rebased against the current master and did some changes along the way:
Regarding the firefox situation: I think that if nixpkgs wants to support playwright + firefox, it should try to package the upstream patched binary and make it run instead of producing a similar patched binary with the nixpkgs firefox derivation. The main reason is that playwright is a e2e testing framework and environments should be quite reproducible so that it makes sense. Replacing binaries changes the environment drastically (like it does not work at all and all your tests fail under NixOS 😆). Patching them to make them work under NixOS only will produce NixOS issues like dynamic linker, patchelf etc. but not fundamental issues like version mismatch (playwright assumes it's firefox x, but nixpkgs replaced it with y) or missing APIs. |
firefox requires patches to work with playwright, nixpkgs' firefox does not work out of the box with playwright. Discussion: NixOS#214939
6226a3b
to
13a4644
Compare
@wegank Ah nice, I did not see that! |
so, is it possible to use playwright test on a nodejs project in nixos? I have tried a bunch of different combination of pkgs, like playwright, playwright-driver, playwright-test, set up the env vars PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true PLAYWRIGHT_BROWSERS_PATH=$(nix build --print-out-paths nixpkgs#playwright-driver.browsers) and typing |
You need to make sure that the nixpkgs version and the one installed via npm are using the exact same version of playwright. Maybe your npm installed one is more recent. |
Description of changes
Updates playwright from 1.27.1 to 1.31.0. Tested by running (typescript) e2e tests and
playwright cr https://nixos.org
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes