pactflow / example-provider-dotnet

.NET provider example
MIT License
3 stars 25 forks source link

SSL Error though added SSL_CERT_FILE variable in environment #1

Closed tl-madhulika-mitra closed 2 years ago

tl-madhulika-mitra commented 2 years ago

The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested bundler: failed to load command: /pact/bin/pact (/pact/bin/pact) /usr/lib/ruby/2.7.0/net/protocol.rb:44:in connect_nonblock': SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain) (OpenSSL::SSL::SSLError) from /usr/lib/ruby/2.7.0/net/protocol.rb:44:inssl_socket_connect' from /usr/lib/ruby/2.7.0/net/http.rb:1009:in connect' from /usr/lib/ruby/2.7.0/net/http.rb:943:indo_start' from /usr/lib/ruby/2.7.0/net/http.rb:932:in start' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/hal/http_client.rb:79:inblock in perform_request' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/hal/http_client.rb:93:in until_truthy_or_max_times' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/hal/http_client.rb:64:inperform_request' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/hal/http_client.rb:25:in get' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/hal/link.rb:41:inget' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/hal/link.rb:45:in get!' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/hal_client_methods.rb:20:inindex_resource' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/publish_pacts.rb:31:in call' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/publish_pacts.rb:14:incall' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/cli/broker.rb:157:in publish_pacts' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/cli/broker.rb:42:inpublish' from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:ininvoke_command' from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in dispatch' from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/base.rb:485:instart' from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.58.0/lib/pact_broker/client/cli/custom_thor.rb:15:in start' from /pact/lib/pact/cli.rb:60:inpublish' from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:ininvoke_command' from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in dispatch' from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/base.rb:485:instart' from /pact/bin/pact:15:in <top (required)>' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:inload' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in kernel_load' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:28:inrun' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:474:in exec' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:inrun' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor.rb:392:indispatch' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:30:in dispatch' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:instart' from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:24:in `start'

I used -https://github.com/pact-foundation/pact-js-core/issues/93#issuecomment-532863454 to fix my issue while doing contract testing with Pact flow. Used the property SetSslCaFilePath on the uri options.

But while trying to setup this project for Bidirectional test -https://github.com/pactflow/example-bi-directional-consumer-dotnet - make fake_ci, I am facing the error. So I setup the export SSL_CERT_FILE=path to bundle of my certificates files in my zshrc file, but I still face the error.

Please let me know if I have to do anything differently

tl-madhulika-mitra commented 2 years ago

Opened the issue in the correct GIT project. So closing this issue.https://github.com/pactflow/example-bi-directional-consumer-dotnet/issues/6