Unable to find valid certification path to request target
Condition & Cause
You encounter the error message “PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target“
when running with TestCloud.
This issue happens because the generated CA certificate is not set as trusted by the system, therefore restricts Katalon Studio to connect with TestCloud.
Solution
You need to download the cert chain from the browser (Chrome/Firefox) and import it into the Local System Trusted Store.
Export and download the certificate chain from the browser
- Make sure that the proxy server is enabled.
- Open the Chrome and access https://testcloud.katalon.com/healthcheck.
- Export and download the certificate chain as follows:
- Click the lock icon from URL address bar.
- Select Connection is secure > Certificate is valid.
- In the Certificate Viewer dialog, select the Details tab then Export.
- Save the certificate in the “Base64-encoded ASCII, certificate chain” format.
Install the certificate into Local System Trusted Store
Permission Required
- To complete this action, the system must access the Trusted Root Certification Authorities store. Please run the application with administrator privileges to allow access to the local system certificate store.
Open Windows PowerShell with Administrator and run the following PowerShell command to install it into Local System Trusted Store.
Import-Certificate -FilePath "downloaded-file-location" -CertStoreLocation Cert:\LocalMachine\Root
Replace the downloaded-file-location
with the certificate's location, for example, C:\Users\user.name\Downloads\katalon.crt
.