selenium webdriver - BrowserStack SDK: PKIX Path Building Failed Error on Office Machine but Works on Personal Machine - Stack O

admin2025-04-17  3

I have downloaded the sample project provided by BrowserStack that integrates with the BrowserStack SDK. The setup is complete, and I am executing tests using the command:

mvn clean test

The execution works perfectly on my personal machine. However, on my office machine, while the tests still run smoothly, I encounter the following error:

[TEST HUB] EXCEPTION IN BUILD START EVENT : com.browserstack.testOps.RequestException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I have already tried the following steps but no success:

  • Downloaded the SSL certificate from BrowserStack and added it to the Java cacerts trust store.
  • Verified the certificate import using keytool.
  • Ensured that my Java version and Maven configurations are the same on both machines.
  • Attempted to use the acceptInsecureCerts flag in the YAML file, but it didn't work.
  • Also tried using a proxy, but that didn't help either.

Has anyone faced a similar issue? Are there any additional configurations or network restrictions that might cause this problem in a corporate environment? Any help would be appreciated.

转载请注明原文地址:http://anycun.com/QandA/1744838879a88333.html