dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.83k stars 457 forks source link

Playwright tests failing on linux complaining about missing dependencies #4921

Open radical opened 3 months ago

radical commented 3 months ago

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=742280 Build error leg or test failing: Aspire.Workload.Tests.EmptyTemplateRunTests.Aspire.Workload.Tests.EmptyTemplateRunTests.ResourcesShowUpOnDashboad Pull request: https://github.com/dotnet/aspire/pull/4914

Aspire.Workload.Tests: [apphost] info: Aspire.Hosting.DistributedApplication[0]
Aspire.Workload.Tests: [apphost]       Distributed application started. Press Ctrl+C to shut down.
Aspire.Workload.Tests: -- Ready to run tests --
    Aspire.Workload.Tests.EmptyTemplateRunTests.ResourcesShowUpOnDashboad [FAIL]
      System.AggregateException : One or more errors occurred. (
      ╔══════════════════════════════════════════════════════════╗
      ║ Host system is missing dependencies to run browsers.     ║
      ║ Please install them with the following command:          ║
      ║                                                          ║
      ║     sudo pwsh bin/Debug/netX/playwright.ps1 install-deps ║
      ║                                                          ║
      ║ Alternatively, use apt:                                  ║
      ║     sudo apt-get install libgbm1\                        ║
      ║         libxkbcommon0                                    ║
      ║                                                          ║
      ║ <3 Playwright Team                                       ║
      ╚══════════════════════════════════════════════════════════╝)
      ---- Microsoft.Playwright.PlaywrightException : 
      ╔══════════════════════════════════════════════════════════╗
      ║ Host system is missing dependencies to run browsers.     ║
      ║ Please install them with the following command:          ║
      ║                                                          ║
      ║     sudo pwsh bin/Debug/netX/playwright.ps1 install-deps ║
      ║                                                          ║
      ║ Alternatively, use apt:                                  ║
      ║     sudo apt-get install libgbm1\                        ║
      ║         libxkbcommon0                                    ║
      ║                                                          ║
      ║ <3 Playwright Team                                       ║
      ╚══════════════════════════════════════════════════════════╝
      Stack Trace:
           at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
           at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
           at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout)
        /_/tests/Aspire.Workload.Tests/WorkloadTestsBase.cs(28,0): at Aspire.Workload.Tests.WorkloadTestsBase.CreateBrowser()
           at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
           at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
           at System.Lazy`1.CreateValue()
        /_/tests/Aspire.Workload.Tests/WorkloadTestsBase.cs(37,0): at Aspire.Workload.Tests.WorkloadTestsBase.CreateNewBrowserContextAsync()
        /_/tests/Aspire.Workload.Tests/EmptyTemplateRunTests.cs(22,0): at Aspire.Workload.Tests.EmptyTemplateRunTests.ResourcesShowUpOnDashboad()
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace -----
        /_/src/Playwright/Transport/Connection.cs(206,0): at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](ChannelOwner object, String method, Dictionary`2 dictionary, Boolean keepNulls)
        /_/src/Playwright/Transport/Connection.cs(532,0): at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func`1 action, Boolean isInternal)
        /_/src/Playwright/Core/BrowserType.cs(56,0): at Microsoft.Playwright.Core.BrowserType.LaunchAsync(BrowserTypeLaunchOptions options)
        /_/tests/Shared/Playwright/PlaywrightProvider.cs(36,0): at Aspire.Workload.Tests.PlaywrightProvider.CreateBrowserAsync(BrowserTypeLaunchOptions options)
        /_/tests/Aspire.Workload.Tests/WorkloadTestsBase.cs(24,0): at Aspire.Workload.Tests.WorkloadTestsBase.<>c.<<CreateBrowser>b__5_0>d.MoveNext()

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "Host system is missing dependencies to run browsers",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

This shouldn't be happening because the queue should have the dependencies installed on the vm image itself (https://github.com/dotnet/dnceng/issues/3122).

cc @joperezr

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=742280 Error message validated: [Host system is missing dependencies to run browsers] Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 7/16/2024 4:31:26 AM UTC

Report

Build Definition Test Pull Request
770579 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#5066
763362 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#5066
754704 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#5064
754402 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#5066
742611 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#4926
742506 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#4923
742505 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#4924
742495 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#4850
742419 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#4805
742280 dotnet/aspire Aspire.Workload.Tests.Xunit_PerTestFrameworkTemplatesTests.WorkItemExecution dotnet/aspire#4914

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 10
radical commented 3 months ago

Related to https://github.com/dotnet/aspire/issues/4623 .

radical commented 3 months ago

These tests have been disabled with https://github.com/dotnet/aspire/pull/4922 . Closing, this in favor of the original issue.

radical commented 3 months ago

Re-opening because https://github.com/dotnet/aspire/issues/4623#issuecomment-2231591055 .