[BUG] nix and playwright: install-deps is missing required dependencies
See original GitHub issueContext:
- Playwright Version: 1.25.0
- Operating System: Linux (Debian 11)
- Node.js version: v16.1.0
- Browser: Chromium
- Extra:
➜ hostnamectl
Static hostname: work-machine
Pretty hostname: work machine
Icon name: computer-laptop
Chassis: laptop
Machine ID: c3a17238f0f0b7f7c73994f3616edc3e
Boot ID: 87ed44a27c324165a0e5d31e49261133
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.12.0-rc7+
Architecture: x86-64
➜ npx envinfo --preset playwright --markdown
## System:
- OS: Linux 5.12 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
- Memory: 10.78 GB / 46.80 GB
- Container: Yes
## Binaries:
- Node: 16.1.0 - /nix/store/2mnn77jly8q0mqaayca5mjfv23f3pks4-bifrost-env/bin/node
- npm: 7.11.2 - /nix/store/2mnn77jly8q0mqaayca5mjfv23f3pks4-bifrost-env/bin/npm
## Languages:
- Bash: 5.1.8 - /nix/store/lz9s7v9xxkr3jf4wlah9vw1knmic2nda-bash-interactive-5.1-p8/bin/bash
Describe the bug
Tests are failing with the following error
140) [Desktop Chrome] › playwright/tests/forms_cms_standard.spec.ts:24:9 › lp-standard cms-generated pages › [140/140] fills and submits form on /resources/workshop-gcp-workshop-2022/
browserType.launch:
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries: ║
║ libgobject-2.0.so.0 ║
║ libglib-2.0.so.0 ║
║ libnss3.so ║
║ libnssutil3.so ║
║ libsmime3.so ║
║ libnspr4.so ║
║ libatk-1.0.so.0 ║
║ libatk-bridge-2.0.so.0 ║
║ libcups.so.2 ║
║ libgio-2.0.so.0 ║
║ libdrm.so.2 ║
║ libdbus-1.so.3 ║
║ libexpat.so.1 ║
║ libxcb.so.1 ║
║ libxkbcommon.so.0 ║
║ libX11.so.6 ║
║ libXcomposite.so.1 ║
║ libXdamage.so.1 ║
║ libXext.so.6 ║
║ libXfixes.so.3 ║
║ libXrandr.so.2 ║
║ libgbm.so.1 ║
║ libpango-1.0.so.0 ║
║ libcairo.so.2 ║
║ libasound.so.2 ║
║ libatspi.so.0 ║
║ libwayland-client.so.0 ║
╚══════════════════════════════════════════════════════╝
yet when running npx playwright install-deps, it’s telling me everything’s up-to-date and installed
➜ npx playwright install-deps
Installing dependencies...
Switching to root user to install dependencies...
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
Hit:5 https://packages.microsoft.com/repos/vscode stable InRelease
Hit:6 https://deb.beekeeperstudio.io stable InRelease
Hit:7 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:8 https://download.docker.com/linux/debian buster InRelease
Hit:4 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Hit:9 http://fai-project.org/download bullseye InRelease
Hit:10 http://deb.debian.org/debian bullseye-backports InRelease
Hit:11 http://repository.spotify.com stable InRelease
Hit:3 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libasound2 is already the newest version (1.2.4-1.1).
libatk-bridge2.0-0 is already the newest version (2.38.0-1).
libatspi2.0-0 is already the newest version (2.38.0-4).
libatk1.0-0 is already the newest version (2.36.0-2).
libcairo-gobject2 is already the newest version (1.16.0-5).
libcairo2 is already the newest version (1.16.0-5).
libcups2 is already the newest version (2.3.3op2-3+deb11u2).
libdbus-1-3 is already the newest version (1.12.20-2).
libdbus-glib-1-2 is already the newest version (0.110-6).
libenchant-2-2 is already the newest version (2.2.15-1).
libfontconfig1 is already the newest version (2.13.1-4.2).
fonts-freefont-ttf is already the newest version (20120503-10).
fonts-ipafont-gothic is already the newest version (00303-21).
fonts-liberation is already the newest version (1:1.07.4-11).
fonts-noto-color-emoji is already the newest version (0~20200916-1).
fonts-tlwg-loma-otf is already the newest version (1:0.7.2-1).
fonts-wqy-zenhei is already the newest version (0.9.45-8).
libfreetype6 is already the newest version (2.10.4+dfsg-1+deb11u1).
libatomic1 is already the newest version (10.2.1-6).
libgdk-pixbuf-2.0-0 is already the newest version (2.42.2+dfsg-1).
libglib2.0-0 is already the newest version (2.66.8-1).
gstreamer1.0-libav is already the newest version (1.18.4-3).
gstreamer1.0-plugins-bad is already the newest version (1.18.4-3).
gstreamer1.0-plugins-base is already the newest version (1.18.4-2).
libgstreamer-gl1.0-0 is already the newest version (1.18.4-2).
libgstreamer-plugins-base1.0-0 is already the newest version (1.18.4-2).
libgstreamer1.0-0 is already the newest version (1.18.4-2.1).
libgtk-3-0 is already the newest version (3.24.24-4+deb11u2).
libharfbuzz-icu0 is already the newest version (2.7.4-1).
libharfbuzz0b is already the newest version (2.7.4-1).
libhyphen0 is already the newest version (2.8.8-7).
libicu67 is already the newest version (67.1-7).
liblcms2-2 is already the newest version (2.12~rc1-2).
libdrm2 is already the newest version (2.4.104-1).
libepoxy0 is already the newest version (1.5.5-1).
libevdev2 is already the newest version (1.11.0+dfsg-1).
libegl1 is already the newest version (1.3.2-1).
libgles2 is already the newest version (1.3.2-1).
libglx0 is already the newest version (1.3.2-1).
libopengl0 is already the newest version (1.3.2-1).
libgudev-1.0-0 is already the newest version (234-1).
libjpeg62-turbo is already the newest version (1:2.0.6-4).
libmanette-0.2-0 is already the newest version (0.2.5-1).
libnotify4 is already the newest version (0.7.9-3).
libpng16-16 is already the newest version (1.6.37-3).
libproxy1v5 is already the newest version (0.4.17-1).
libsecret-1-0 is already the newest version (0.20.4-2).
libsoup2.4-1 is already the newest version (2.72.0-2).
libwebp6 is already the newest version (0.6.1-2.1).
libwebpdemux2 is already the newest version (0.6.1-2.1).
libx11-6 is already the newest version (2:1.7.2-1).
libx11-xcb1 is already the newest version (2:1.7.2-1).
libxcb-shm0 is already the newest version (1.14-3).
libxcb1 is already the newest version (1.14-3).
libxcomposite1 is already the newest version (1:0.4.5-1).
libxcursor1 is already the newest version (1:1.2.0-2).
libxdamage1 is already the newest version (1:1.1.5-2).
libxext6 is already the newest version (2:1.3.3-1.1).
libxfixes3 is already the newest version (1:5.0.3-2).
libxi6 is already the newest version (2:1.7.10-1).
libxkbcommon0 is already the newest version (1.0.3-2).
libxml2 is already the newest version (2.9.10+dfsg-6.7+deb11u2).
libxrandr2 is already the newest version (2:1.5.1-1).
libxrender1 is already the newest version (1:0.9.10-1).
libxslt1.1 is already the newest version (1.1.34-4).
libxtst6 is already the newest version (2:1.2.3-1).
libgbm1 is already the newest version (20.3.5-1).
libnspr4 is already the newest version (2:4.29-1).
libnss3 is already the newest version (2:3.61-1+deb11u2).
libopenjp2-7 is already the newest version (2.4.0-3).
libopus0 is already the newest version (1.3.1-0.1).
libpango-1.0-0 is already the newest version (1.46.2-3).
libpangocairo-1.0-0 is already the newest version (1.46.2-3).
fonts-unifont is already the newest version (1:13.0.06-1).
libwayland-client0 is already the newest version (1.18.0-2~exp1.1).
libwayland-egl1 is already the newest version (1.18.0-2~exp1.1).
libwayland-server0 is already the newest version (1.18.0-2~exp1.1).
libwoff1 is already the newest version (1.0.2-1+b1).
xfonts-cyrillic is already the newest version (1:1.0.5).
xfonts-scalable is already the newest version (1:1.0.3-1.2).
gstreamer1.0-plugins-good is already the newest version (1.18.4-2+deb11u1).
xvfb is already the newest version (2:1.20.11-1+deb11u2).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
Here’s my playwright.config.ts
import { devices, PlaywrightTestConfig } from "@playwright/test";
const config: PlaywrightTestConfig = {
forbidOnly: Boolean(process.env.CI),
reporter: "list",
fullyParallel: true,
workers: 4,
maxFailures: process.env.CI ? 10 : undefined,
use: {
trace: "on-first-retry",
viewport: { width: 1440, height: 720 },
},
outputDir: "./playwright-test-results",
projects: [
{
name: "Desktop Chrome",
use: {
...devices["Desktop Chrome"],
browserName: "chromium",
},
},
],
};
export default config;
Ideally install-deps should be installing those missing deps, and I don’t need to manually sudo apt install every single one.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
[BUG] nix and playwright: install-deps is missing required ...
I tried reproducing, but was unable to at this time: $ npx playwright install-deps 0 upgraded, 0 newly installed, 0 to remove and...
Read more >[BUG] Can't run Playwright in Nix · Issue #5501 - GitHub
Running Playwright in Nix Shell throws missing dependencies error. ... [BUG] nix and playwright: install-deps is missing required ...
Read more >playwright._impl._api_types.Error: Host system is missing ...
This means that your operating system dependencies are not installed. You can install them by executing playwright install-deps after you ...
Read more >Release notes — conda-build 3.23.3+0.g20b08017.dirty ...
When checking for circular dependencies in cross-compiling mode, build requirements are ignored now. Make sure symlinked directories are found in ...
Read more >27482 – parallel make -j 16 install falls over in 2.36
I think there may be some missing dependencies for libctf in binutils 2.36. I'm finding that 'make -j 16 install' falls over.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

👍 Yeah, I’m not a nix user, but looks like the info in https://github.com/microsoft/playwright/pull/5806 will help (either the code or some community user comments in that PR).
If you’re open to it, feel free to contribute a PR doc page of how to use PW and nix!
Hid my last comment, as it’s no longer relevant.
I’m not a nix user, but it sounds like some interaction with nix and Playwright is not happy. For now, I recommend running outside of nix-shell since that works 😄 .
If you sort out the nix issue, please file a new issue and we can address, otherwise we’ll have to continue recommending running outside nix since I don’t have the expertise to troubleshoot nix.
Thanks!