aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Helix OSX - Playwright ERR_CERT_DATABASE_CHANGED failures Individual Auth

Open HaoK opened this issue 3 years ago • 6 comments

IndividualAuth_Works tests are failing with the following on OSX, this seems like its generally an issue when the trust store is modified which causes Chrome to flush all the connections, we should investigate to see if we can avoid these exceptions

PlaywrightSharp.PlaywrightSharpException : net::ERR_CERT_DATABASE_CHANGED at http://localhost:63342/
=========================== logs ===========================
navigating to "http://localhost:63342/", waiting until "load"

  at PlaywrightSharp.Transport.Connection.SendMessageToServerAsync[T](String guid, String method, Object args, Boolean ignoreNullValues, JsonSerializerOptions serializerOptions, Boolean treatErrorPropertyAsError) in /home/runner/work/playwright-sharp/playwright-sharp/src/PlaywrightSharp/Transport/Connection.cs:line 186
   at PlaywrightSharp.Frame.GoToAsync(Boolean isPage, String url, Nullable`1 waitUntil, String referer, Nullable`1 timeout) in /home/runner/work/playwright-sharp/playwright-sharp/src/PlaywrightSharp/Frame.cs:line 761
   at Templates.Test.Helpers.AspNetProcess.VisitInBrowserAsync(IPage page) in /_/src/ProjectTemplates/Shared/AspNetProcess.cs:line 108
   at Templates.Test.BlazorServerTemplateTest.BlazorServerTemplateWorks_IndividualAuth(BrowserKind browserKind, Boolean useLocalDB) in /_/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs:line 164
--- End of stack trace from previous location ---

HaoK avatar Mar 11 '21 00:03 HaoK

I think I ran into this in my prototype, but there's an easy solution for it.

We create a cert every time we spin up a .NET project, we can switch to create a single https certificate and use that for all of our tests instead.

javiercn avatar Mar 11 '21 16:03 javiercn

Thanks for contacting us. We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

ghost avatar Mar 11 '21 17:03 ghost

Re-opening this issue as it's still used to mark tests as quarantined.

  • BlazorServerTemplateWorks_IndividualAuth
  • BlazorWasmHostedTemplate_IndividualAuth_Works_WithOutLocalDB
  • BlazorServerTemplateWorks_IndividualAuth

TanayParikh avatar Nov 16 '21 23:11 TanayParikh

@TanayParikh I see this has the test-fixed label but could you clarify which PR contained the fix? I'm unclear on how to know if it's been 30 days since this was fixed.

SteveSandersonMS avatar Nov 18 '21 13:11 SteveSandersonMS

which PR contained the fix

https://github.com/dotnet/aspnetcore/pull/31012

I'm unclear on how to know if it's been 30 days since this was fixed.

This issue was closed out when the above PR was merged, but the underlying tests were never un-quarantined. Given it was merged in March, assuming all the tests have a consistent pass rate, we should be fine to un-quarantine now.

TanayParikh avatar Nov 18 '21 16:11 TanayParikh

We need Helix enabled for the Playwright tests first before we resolve this issue (if this is still an issue):

Depends on: https://github.com/dotnet/aspnetcore/issues/38818

TanayParikh avatar Dec 21 '22 23:12 TanayParikh

We need Helix enabled for the Playwright tests first before we resolve this issue (if this is still an issue):

We're running the tests specifically on the build agents for now due to issues with Helix compatibility. Backlogging this until we decide we'd like these tests running on helix.

TanayParikh avatar Feb 01 '23 00:02 TanayParikh

For reference here: I believe the issue is that we generate a new HTTPS cert for each test and that causes issues on chrome. We can generate a single HTTPS cert at the beginning of the test run and that should get rid of these problems.

javiercn avatar Feb 06 '23 12:02 javiercn

Closing as a dupe of https://github.com/dotnet/aspnetcore/issues/46430

mkArtakMSFT avatar Feb 20 '24 17:02 mkArtakMSFT