GitHub
01/17/2024, 9:40 AM[10:18:42.822] ERROR (71098): pact-core@14.0.6: Pact Binary Error: WARN: Ignoring unsupported matching rules {"$.password"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}, "$.username"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}} for path ['body']
[10:18:42.822] DEBUG (71098): pact-core@14.0.6: WARN: Ignoring unsupported matching rules {"$.access_token"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}} for path ['body']
[10:18:42.822] ERROR (71098): pact-core@14.0.6: Pact Binary Error: WARN: Ignoring unsupported matching rules {"$.access_token"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}} for path ['body']
I've tried to use all available version like PactV3 and PactV4, additionally I've tried to use specification version 3 and 4. Every single time I've got an error described down below.
I would like to use StubServer to provide the mocks for my fronted app. I have created a reproducable git repository to illustrate the problem. All you need to do is clone this repo and run specified commands (see below)
Software versions
• OS: MacOS Sonoma 14.2.1
• Pact Node version:
• `@pact-foundation/pact`: 12.1.2
• `@pact-foundation/pact-core`: 14.0.6
• Node Version: v18.19.0
Issue Checklist
Please confirm the following:
☑︎ I have upgraded to the latest
☑︎ I have the read the FAQs in the Readme
☑︎ I have triple checked, that there are no unhandled promises in my code
☑︎ I have set my log level to debug and attached a log file showing the complete request/response cycle
☑︎ For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem
Expected behaviour
Stub server runs correctly with generated pact.
Actual behaviour
Steps to reproduce
• Clone repository
• Run npm install (remember to use node >= 18)
• Run npm run test
• Run npm run start-stub
Result: Stub server shows error with ignoring unsupported matching rules
Relevant log files
[10:18:42.429] INFO (71098): pact-core@14.0.6: Creating Pact Stub with options:
{"port":8080,"logLevel":"DEBUG","pactUrls":["/Users/olebuda/projects/pact/pacts"],"ssl":false,"cors":false,"host":"localhost"}
[10:18:42.432] DEBUG (71098): pact-core@14.0.6: Starting pact binary '/Users/olebuda/projects/pact/node_modules/@pact-foundation/pact-core/standalone/darwin-arm64-2.0.7/pact/bin/pact-stub-service', with arguments [/Users/olebuda/projects/pact/pacts --port 8080 --log-level DEBUG --host localhost]
[10:18:42.434] DEBUG (71098): pact-core@14.0.6: Created '/Users/olebuda/projects/pact/node_modules/@pact-foundation/pact-core/standalone/darwin-arm64-2.0.7/pact/bin/pact-stub-service' process with PID: 71176
[10:18:42.822] DEBUG (71098): pact-core@14.0.6: WARN: Ignoring unsupported matching rules {"$.password"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}, "$.username"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}} for path ['body']
[10:18:42.822] ERROR (71098): pact-core@14.0.6: Pact Binary Error: WARN: Ignoring unsupported matching rules {"$.password"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}, "$.username"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}} for path ['body']
[10:18:42.822] DEBUG (71098): pact-core@14.0.6: WARN: Ignoring unsupported matching rules {"$.access_token"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}} for path ['body']
[10:18:42.822] ERROR (71098): pact-core@14.0.6: Pact Binary Error: WARN: Ignoring unsupported matching rules {"$.access_token"=>{"combine"=>"AND", "matchers"=>[{"match"=>"type"}]}} for path ['body']
[10:18:42.823] DEBUG (71098): pact-core@14.0.6: INFO: Loading interactions from /Users/olebuda/projects/pact/pacts/LoginConsumer-LoginProvider.json
I, [2024-01-17T10:18:42.822114 #71176] INFO -- : Registered expected interaction POST /api/login
D, [2024-01-17T10:18:42.822168 #71176] DEBUG -- : {
"description": "a request to login user",
"request": {
"method": "POST",
"path": "/api/login",
"headers": {
"Content-Type": "application/json"
},
"body": {
"password": "password",
"username": "username"
}
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"body": {
"access_token": "some string"
}
},
"metadata": null
}
mock WARN: Please note: we are tracking events anonymously to gather important usage statistics like Pact-Ruby version and operating system. To disable tracking, set the 'PACT_DO_NOT_TRACK' environment variable to 'true'.
INFO WEBrick 1.8.1
[10:18:42.823] DEBUG (71098): pact-core@14.0.6: INFO ruby 3.2.2 (2023-03-30) [arm64-darwin22]
[10:18:42.826] DEBUG (71098): pact-core@14.0.6: INFO WEBrick::HTTPServer#start: pid=71176 port=8080
[10:19:03.738] INFO (71098): pact-core@14.0.6: Removing all Pact stubs.
pact-foundation/pact-js-coreGitHub
01/17/2024, 11:15 AM