Search code examples
.netangularplaywright

Failed to load resource: SSL peer certificate or SSh remote key was not OK


I am developing an application with angular and .net. I happen to be testing the angular application with playwright. The test they need to pass is to pass the login screen. It turns out that when I click on a button to make the login request to the back in chronium and firefox it works great but in webkit I get the following error:

Failed to load resource: SSL peer certificate or SSh remote key was not OK.

enter image description here

enter image description here

I don't understand why this happens and I don't know if it is because with webkit I have to configure something additional when I make the request to the back.

Please someone help me to solve this mystery.


Solution

  • If that's an issue of your tests - try to use ignoreHTTPSErrors in playwright.config

     use: {
        ignoreHTTPSErrors: true,
     },
    

    per browser

    projects: [
        {
          name: "Desktop Safari",
          use: {
            ignoreHTTPSErrors: true,
          },
        },
      ]
    

    or in test directly

    test.use({
      ignoreHTTPSErrors: true,
    });