Skip to content

[Bug]: Playwright error — Host system is missing dependencies to run browsers #1415

Open
@dtinth

Description

@dtinth

Current Behavior (bug)
When running a Playwright test, browsers won’t run at all. Instead, tests immediately fail with this error message:

Running 2 tests using 1 worker
  1) [chromium] › example.spec.js:4:1 › has title ──────────────────────────────────────────────────

    Error: 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                                  ║
    ║     libdbus-1.so.3                                   ║
    ║     libexpat.so.1                                    ║
    ║     libdrm.so.2                                      ║
    ║     libxcb.so.1                                      ║
    ║     libxkbcommon.so.0                                ║
    ║     libatspi.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                                   ║
    ╚══════════════════════════════════════════════════════╝

Expected Behavior (fix)
Browsers should run just like in most environments.

Additional context
$ devbox version -v

Version:     0.5.11
Platform:    linux_arm64
Commit:      1052c4e37c16ce0df5d60afb8c82076cd290eee8
Commit Time: 2023-08-10T23:32:09Z
Go Version:  go1.20.7
Launcher:    0.2.0

devbox.json https://github.com/dtinth/devbox-playwright-issue/blob/main/devbox.json

To reproduce:

Use a Linux box.

  1. Clone this repo: https://github.com/dtinth/devbox-playwright-issue
  2. Enter a shell:
    devbox shell
    
  3. Install deps:
    pnpm install
    
  4. Install browsers:
    pnpm playwright install --with-deps
    
  5. Run test:
    pnpm playwright test
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    aarch64aarch64 (or arm64) systemsbugSomething isn't workingjavascriptPull requests that update Javascript codelinkerRelated to linking (ld, ld.so or dyld)linuxLinux systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions