playwright: Missing dependency chrome_elf.dll

Running the following test using .NET

public async Task Test1()
{
    using var playwright = await Playwright.CreateAsync();
    await using var browser = await playwright.Chromium.LaunchAsync(new() { Headless = false });
    var page = await browser.NewPageAsync();
    await page.GotoAsync("https://playwright.dev/dotnet");
    await page.ScreenshotAsync(new PageScreenshotOptions { Path = "screenshot.png" });
}

Results in following error


[xUnit.net 00:00:02.01]     PlaywrightDemo.UnitTest1.Test1 [FAIL]
  Failed PlaywrightDemo.UnitTest1.Test1 [1 s]
  Error Message:
   Microsoft.Playwright.PlaywrightException : Host system is missing dependencies!

Full list of missing libraries:
    chrome_elf.dll

  Stack Trace:
     at Microsoft.Playwright.Transport.Connection.SendMessageToServerAsync[T](String guid, String method, Object args)
   at Microsoft.Playwright.BrowserType.LaunchAsync(IEnumerable`1 args, String channel, Nullable`1 chromiumSandbox, Nullable`1 devtools, String downloadsPath, IEnumerable`1 env, String executablePath, Nullable`1 handleSIGINT, Nullable`1 handleSIGTERM, Nullable`1 handleSIGHUP, Nullable`1 headless, Proxy proxy, Nullable`1 timeout, String tracesDir, IEnumerable`1 firefoxUserPrefs, Nullable`1 slowMo, IEnumerable`1 ignoreDefaultArgs, Nullable`1 ignoreAllDefaultArgs)
   at PlaywrightDemo.UnitTest1.Test1() in C:\WS\Tmp\PlaywrightDemo\PlaywrightDemo\UnitTest1.cs:line 13
--- End of stack trace from previous location ---

The chrome_elf.dll IS present in the following location: C:\Users<username>\AppData\Local\ms-playwright\chromium-888113\chrome-win\chrome_elf.dll

NuGet Package: Microsoft.Playwright (Version 1.12.2) Node.JS: v16.4.2 Dotnet: 5.0.301 OS: Windows 10

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@aslushnikov

Running PrintDeps.exe results in the following:

PS C:\PlaywrightDemo\node_modules\playwright\bin> .\PrintDeps.exe C:\Users\UserName\AppData\Local\ms-playwright\chromium-888113\chrome-win\chrome.exe C:\Users\UserName\AppData\Local\ms-playwright\chromium-888113\chrome-win\chrome.exe
    KERNEL32.dll => C:\windows\System32\KERNEL32.DLL
    VERSION.dll => C:\windows\SYSTEM32\VERSION.dll
    chrome_elf.dll => not found

And again checked chrome_elf.dll is still available

image

First of all thank you for your quick response.

I completely removed the ms-playwright folder and reinstalled. Because I am behind a corporate proxy the playwright install command fails.

Failed to install browsers
Error: Failed to download chromium, caused by
Error: connect ETIMEDOUT 13.107.246.67:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)

I have installed the Browsers using the command: npm i -D playwright

This again downloads chromium, ffmpeg, firefox and webkit. I can start chrome.exe from the chromium-888113/chrome-win folder.

chrome_elf.dll is present image

Test still fail with same error: Host system is missing dependencies! (chrome_elf.dll)