question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question]: "Microsoft.Playwright assembly was found, but is missing required assets." - showing while trying to download browser binaries.

See original GitHub issue

Your question

Trying to download browser binaries using playwright.ps1 install , but it shows Microsoft.Playwright assembly was found, but is missing required assets. Please ensure to build your project before running Playwright tool. Even after building my dotnet project the result is same as this.

Any kind of help will be apricated, thanks.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
paulsuartcommented, Apr 20, 2023

As @gaelj mentioned, adding this to the .csproj file that references playwright will do the trick:

<PropertyGroup>
  <PlaywrightPlatform>all</PlaywrightPlatform>
</PropertyGroup>

I was building on Windows, copying files in a docker build and attempting to run pwsh playwright.ps1 install chromium on Linux and getting the error reported by the OP.

Adding <PlaywrightPlatform>all</PlaywrightPlatform> solved it.

1reaction
milkyjoe90commented, Jul 24, 2023

As @gaelj mentioned, adding this to the .csproj file that references playwright will do the trick:

<PropertyGroup>
  <PlaywrightPlatform>all</PlaywrightPlatform>
</PropertyGroup>

I was building on Windows, copying files in a docker build and attempting to run pwsh playwright.ps1 install chromium on Linux and getting the error reported by the OP. Adding <PlaywrightPlatform>all</PlaywrightPlatform> solved it.

This helped me. Thank you! I lost 6 hours searching for this solution.

This has also solved the problem for me - it appears to have been introduced in 1.33.0, 1.32 and below were all fine without this entry.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.net - Cannot install playwright: Couldn't find project using ...
Playwright . This method calls the exe located in the .playwright folder. This folder is copied to the build folder when building the...
Read more >
Browsers
Each version of Playwright needs specific versions of browser binaries to operate. You will need to use the Playwright CLI to install these...
Read more >
Installation | Playwright .NET
Start by creating a new project with dotnet new . This will create the PlaywrightTests directory which includes a UnitTest1. · Install the...
Read more >
Browsers | Playwright .NET
Each version of Playwright needs specific versions of browser binaries to operate. You will need to use the Playwright CLI to install these...
Read more >
Use Playwright to automate and test in Microsoft Edge
Use Playwright to automate and test in Microsoft Edge. The Playwright library provides cross-browser automation through a single API.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found