hi guys, I want to try using Pactflow, I have upda...
# pact-jvm
p
hi guys, I want to try using Pactflow, I have updated provider tests configuration (host, scheme and token) but now test fails with the following errors:
Copy code
ERROR [15:45:47] [main] a.c.d.p.c.p.HalClient          Failed to fetch the root HAL document
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
...
is there a way to fix this (on my laptop and during CI build) ?
y
Hey, Have you specified a custom trust store?
p
ok, thank you, I also found this article https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-error-779355358.html it looks like overkill to me, I do not have any custom trust store. I had something similar with RestAssured and it was possible to fix with 1 config line
Copy code
useRelaxedHTTPSValidation
ok, I should read those links, maybe it is not such an overhead as it looks like
y
p
wow, that’s what I want, thank you!:)
y
always read the manual 😅 don't worry I go blind too
also it's not the easiest to find, proactively working on making it easier, open to ideas. Best of luck on your Pact journey
p
I see that the documents are about provider tests, but I get this error when pact is trying to connect to pactflow instance
so if I use my own PactBroker deployed in our local network (http) - no errors
if I switch to pactflow (https) - I get the error about “Failed to fetch the root HAL document”
s
I got that error only in conjunction with missing or bad credentials from pactflow.io side. You are sending the token right?
🌮 1
🙌 1
p
yes, env variable is set and I use it in the test:
Copy code
authentication = @PactBrokerAuth(token = "${PACT_BROKER_TOKEN}"
but PACT_BROKER_HOST was wrong - my local pact broker instead of pactflow, now it works, thanks for help!
🙌 1
y
Excellent @Pavlo Sprogis, glad you are rocking now and thanks for the support @Stefano Lucka ! 🙌 mental note made for dx improvements!
165 Views