Skip to main content

Set proxy certificate when connecting to remote devices

When spying, recording, or executing mobile tests with remote devices through a proxy, you may encounter the issue where Katalon Studio cannot create remote session:
java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: 
Unable to create a new remote session.
Original error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target

When working behind a proxy, Katalon Studio requires a proxy certificate to connect to remote devices. This proxy certificate should be exported by your proxy server in .cer or .crt format.

Follow these steps to add the proxy certificate to Katalon Studio:

  1. Open the JRE folder of Katalon Studio in your command prompt.

    On macOS, JRE is located at: <Katalon Studio folder>/Contents/Eclipse/jre/bin.

    Katalon Studio JRE path
  2. Use keytool utility to add the certificate.
    keytool -importcert -alias <expectedName> -keystore <KS folder>/jre/lib/security/cacerts -file <path to certificate file with .cer/crt extension exported by the proxy server>
    keytool -importcert command

    If you're asked for a password, usually the default password is changeit.

    Katalon Studio will use the imported certificate to connect to remote devices through the proxy.
Was this page helpful?