microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.44k stars 230 forks source link

[Bug]: MSEdge installation fails on macOS 14 GitHub Actions hosted runners #2920

Closed martincostello closed 4 months ago

martincostello commented 4 months ago

Version

1.43.0

Steps to reproduce

  1. Fork https://github.com/martincostello/dotnet-playwright-tests
  2. Run the build GitHub Actions workflow

Expected behavior

The tests pass.

Actual behavior

MSEdge fails to install when the tests are run on the macos-latest runner.

Error: Microsoft.Playwright.PlaywrightException : Chromium distribution 'msedge' is not found at /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge
Run "pwsh bin/Debug/netX/playwright.ps1 install msedge"

  Failed Search_For_DotNet_Core(browserType: "chromium", browserChannel: "msedge") [322 ms]
  Error Message:
   Microsoft.Playwright.PlaywrightException : Chromium distribution 'msedge' is not found at /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge
Run "pwsh bin/Debug/netX/playwright.ps1 install msedge"
  Stack Trace:
     at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](ChannelOwner object, String method, Dictionary`2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 206
   at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func`1 action, Boolean isInternal) in /_/src/Playwright/Transport/Connection.cs:line 526
   at Microsoft.Playwright.Core.BrowserType.LaunchAsync(BrowserTypeLaunchOptions options) in /_/src/Playwright/Core/BrowserType.cs:line 56
   at PlaywrightTests.BrowserFixture.CreateBrowserAsync(IPlaywright playwright, String testName) in /Users/runner/work/dotnet-playwright-tests/dotnet-playwright-tests/PlaywrightTests/BrowserFixture.cs:line 191
   at PlaywrightTests.BrowserFixture.WithPageAsync(Func`2 action, String testName) in /Users/runner/work/dotnet-playwright-tests/dotnet-playwright-tests/PlaywrightTests/BrowserFixture.cs:line 32
   at PlaywrightTests.SearchTests.Search_For_DotNet_Core(String browserType, String browserChannel) in /Users/runner/work/dotnet-playwright-tests/dotnet-playwright-tests/PlaywrightTests/SearchTests.cs:line 45
--- End of stack trace from previous location ---

Additional context

This behaviour appears to have emerged for my repositories in the last ~16 hours with the macos-latest runner images moving from macOS 12 to macOS 14.

For example:

According to the release notes, MSEdge is installed.

Environment

- Operating System: macOS 14.4.1
- CPU: Unsure
- Browser: MSEdge
- .NET Version (TFM): net8.0
mxschmitt commented 4 months ago

I filed an upstream issue: https://github.com/actions/runner-images/issues/9734

mxschmitt commented 4 months ago

See here: https://github.com/actions/runner-images/issues/9734#issuecomment-2074663445

We recommend installing it manually for now. Closing since there is no action needed from our side.