``` [2022-12-01T16:11:52.816Z] Error retrieving ma...
# pactflow
b
Copy code
[2022-12-01T16:11:52.816Z] Error retrieving matrix. PactBroker::Client::Hal::ErrorResponseReturned - Error making request to <https://hmhco.pactflow.io//matrix> status=404
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/entity.rb:197:in `assert_success!'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/link.rb:45:in `get!'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/matrix/query.rb:11:in `call'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/base_command.rb:13:in `call'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/can_i_deploy.rb:107:in `block in fetch_matrix'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/retry.rb:22:in `while_error'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/can_i_deploy.rb:107:in `fetch_matrix'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/can_i_deploy.rb:111:in `fetch_matrix_with_retries'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/can_i_deploy.rb:34:in `call'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/can_i_deploy.rb:23:in `call'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/cli/matrix_commands.rb:36:in `can_i_deploy'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/cli/custom_thor.rb:23:in `start'
[2022-12-01T16:11:52.834Z] /pact/lib/pact/cli.rb:46:in `broker'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
[2022-12-01T16:11:52.834Z] /pact/bin/pact:15:in `<top (required)>'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
[2022-12-01T16:11:52.834Z] /usr/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
[2022-12-01T16:11:52.834Z] /usr/bin/bundle:25:in `load'
[2022-12-01T16:11:52.834Z] /usr/bin/bundle:25:in `<main>'
b
I can see there are two slashes in the URL.
Can you see if you have a trailing slash on your base url?
Yup, it’s the trailing slash.
this works:
Copy code
export PACT_BROKER_BASE_URL="<https://test.pactflow.io>"
  export PACT_BROKER_USERNAME="dXfltyFMgNOFZAxr8io9wJ37iUpY42M"
  export PACT_BROKER_PASSWORD="O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1"

  docker run --rm \
   -e PACT_BROKER_BASE_URL \
   -e PACT_BROKER_USERNAME \
   -e PACT_BROKER_PASSWORD \
    pactfoundation/pact-cli:0.51.0.0 \
    pact-broker can-i-deploy \
    --pacticipant docker-example-consumer \
    --latest
this returns a 404
Copy code
export PACT_BROKER_BASE_URL="<https://test.pactflow.io/>"
export PACT_BROKER_USERNAME="dXfltyFMgNOFZAxr8io9wJ37iUpY42M"
export PACT_BROKER_PASSWORD="O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1"

docker run --rm \
 -e PACT_BROKER_BASE_URL \
 -e PACT_BROKER_USERNAME \
 -e PACT_BROKER_PASSWORD \
  pactfoundation/pact-cli:0.51.0.0 \
  pact-broker can-i-deploy \
  --pacticipant docker-example-consumer \
  --latest
m
Does that mean there was a behaviour change between the two versions that perhaps stripped/canonicalised the URL?
b
I don’t remember making any changes. But there must have been one.
d
having same 😞
b
can you take the trailing slash off?
d
updated to broker docker 2.105.0 from ±102
will check urls
yes, this did the trick
b
cool.
d
for the record , previous version was 2.102.2, now - 2.105.01
b
removing the slash did fix it, thanks