question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

having trouble verifying pacts from broker

See original GitHub issue

when running verifyPacts with pactUrls pointing to local files, it is successfully doing verification of the pact. however, as soon as i try to change the url to point to a pact on my remote broker (https and using basic auth), i get the following error:

[Error: /bin/sh: <part of the password>: command not found
/bin/sh: <a different part of the password>: command not found
/Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/app/lib/pact/provider_verifier/app.rb:32:in `get_pact_consumer_name': undefined method `[]' for nil:NilClass (NoMethodError)
    from /Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/app/lib/pact/provider_verifier/app.rb:55:in `block in verify_pacts'
    from /Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/app/lib/pact/provider_verifier/app.rb:54:in `collect'
    from /Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/app/lib/pact/provider_verifier/app.rb:54:in `verify_pacts'
    from /Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/app/lib/pact/provider_verifier/cli.rb:18:in `verify'
    from /Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/vendor/ruby/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/vendor/ruby/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/vendor/ruby/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/vendor/ruby/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/admin/development/travi.org/api/node_modules/@pact-foundation/pact-provider-verifier-darwin/lib/app/pact-provider-verifier.rb:3:in `<main>'
]

note that the pact that i was using locally was a file fetched directly from the same url and credentials using postman.

i would expect that if it were failing to fetch from the broker, that i would get an error related to the fetch, but i’m not sure how to get more information about the context of the error. i did notice that parts of my password for the broker show up in the error (the minor edits in the output above). they seem to be split after & characters. if this is the case, i’m surprised that i don’t get a “failed to auth” error before it tries to parse for a consumer name.

could you provide some guidance about how to dig deeper? is there a way to put the ruby portion into a debug mode? if this issue is that special characters need to be escaped, i’m not sure what the sequence would need to be here since i am passing the string as an option to verifyPacts. could it be updated to do the necessary escaping automatically?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
mboudreaucommented, Oct 6, 2016

@travi new version released with those changes: 4.5.4.

Please let me know how that goes. Cheers.

0reactions
travicommented, Oct 6, 2016

Looks good on my end. Thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

having trouble verifying pacts from broker · Issue #22 - GitHub
when running verifyPacts with pactUrls pointing to local files, it is successfully doing verification of the pact. however, as soon as i try ......
Read more >
Help! My pact verification tests are failing. What do I do?
Run the pact tests locally with read only credentials. Run just the first failing interaction. Locate the first failure message. In the ...
Read more >
Verify Pact Contract And Continuous Deployment With Pact CLI
In this tutorial, we will look at how to set up a provider test, manage state, verify the contract, and deploy using Pact...
Read more >
Having trouble in verifying the PACT from provider side using ...
Consumer side is working fine. It has generated pact and published too on pact broker URL. Yes it is expecting a status code...
Read more >
Frequently asked questions - Pactflow
At its core, Pactflow is a managed version of the Open Source Pact Broker, ... be used for automation (e.g. for use in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found