Pact "No pacts found for provider" in CI
Provider verification asked the broker for pacts to verify and got none back. The provider name, the consumer version selectors, or the tag/branch filter did not match any published pact, so verification passes vacuously or errors.
What this error means
Verification logs "No pacts found for provider X" or "0 interactions" and exits without verifying anything, often a green build that verified nothing.
INFO: Fetching pacts for orders-provider from https://acme.pactflow.io
WARN: No pacts found for provider "orders-provider" matching the given consumer version selectorsCommon causes
The provider name does not match the published pact
The provider name in the verifier differs from the provider the consumer published against (a typo or a rename), so no pact matches.
Selectors or tags filter out every pact
The consumer version selectors, tag, or branch filter target a slice with no published pacts, so the broker returns an empty set.
How to fix it
Verify the provider name and selectors
- Confirm the provider name matches exactly what the consumer published.
- List published pacts for that provider in the broker UI or API.
- Loosen or correct the consumer version selectors to include a real branch.
consumerVersionSelectors: [
{ mainBranch: true },
{ deployedOrReleased: true },
]Confirm the consumer actually published
Check the broker has a pact for this consumer/provider pair; if not, the consumer publish step is the real gap.
pact-broker list-latest-pact-versions \
--broker-base-url "$PACT_BROKER_BASE_URL"How to prevent it
- Fail the build when zero pacts are returned rather than passing silently.
- Keep provider names identical between consumer publish and provider verify.
- Use
mainBranchanddeployedOrReleasedselectors so real pacts are found.