Thomas K
01/20/2023, 5:47 PMpactPublish step in CI (which uses the pact broker CLI) and im unsure what is causing it or how to solve, hoping someone could give me some ideas / lead me in the right direction please… please see thread for the error outputThomas K
01/20/2023, 5:47 PMStatus: Downloaded newer image for pactfoundation/pact-cli:latest
Cannot change the content of the pact for OtacProviderService version bab2e3650bef58ceae679ca4c8e31b5ba62b0fad and provider OtacProviderService, as race conditions will cause unreliable results for can-i-deploy. Each pact must be published with a unique consumer version number. For more information see <https://docs.pact.io/go/versioning>
{
"response": {
"headers": {
- "Content-Type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json;charset=UTF-8"
}
}
},
{
"response": {
"headers": {
- "Content-Type": "application/json;charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
}
},
@@ -23,7 +23,7 @@
{
"response": {
"headers": {
- "Content-Type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json;charset=UTF-8"
}
}
},Thomas K
01/20/2023, 5:48 PMThomas K
01/20/2023, 5:48 PMdevelopThomas K
01/20/2023, 5:49 PMThomas K
01/20/2023, 5:53 PMBeth (pactflow.io/Pact Broker/pact-ruby)
the pacts havent changed so dont understand why that message appearsThere’s a whitespace change in the headers.
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Thomas K
01/24/2023, 8:56 AMThomas K
01/24/2023, 9:15 AM/usr/lib/ruby/gems/3.0.0/gems/json-2.6.2/lib/json/common.rb:216:in `parse': 859: unexpected token at 'gex": "application/json(;\\\\s?charset=[\\\\w\\\\-]+)?" (JSON::ParserError)
}
},
"status": 201
}
},
{
"description": "a request to reuse a Firebase token",
"providerState": "there is a valid, reusable terminal configuration",
"request": {
"body": {
"activation_code": "TK1474",
"serial_number": "0822382308"
},
"method": "POST",
"path": "/device/activate"
},
"response": {
"body": {
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ8.eyJpc3MiOiJhZy1zdGFnaW5nLW1vYmlsZUBhcHBzcG90LmdzZXJ2aWNlYWNjb3VudC5jb20iLCJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImV4cCI6MTY0NjMxNjU5NiwiaWF0IjoxNjQ2MzEyOTk2LCJzdWIiOiJhZy1zdGFnaW5nLW1vYmlsZUBhcHBzcG90LmdzZXJ2aWNlYWNjb3VudC5jb20iLCJ1aWQiOiI0MTEwMDAzNyJ9.YQKzgFAmYGYi_ygkhBHVp6INGBsOuxGTwYFuwORovjx6uLM8Vs5m7DOa8BpLKfoZ9dSSm8XgsDeSsPH4c6C80eCm5kjJzhCYfI1_GL8uvkpWjqtT7jION7ybQZOoNMJ4rYTb4IyUOu06PG08VFBrt14uem-X_Kk_s-X_jnH2e81QHSvrM1ROCfDpkiDHic9S4op_zcaMPgKzC8vvJj5cY6Y11hPbhY2cb0z9BXIFql4S98rK96Hyw4JY2iWEt2dURtvYt-oyCWE4vP8uod3WEDZsrIc-3druPiZwbKp5Xx1S0MSuAwr8vs6mba5lkvreyoKNJAoxeHaJsnUigGl-Kg"
},
"headers": {
"Content-Type": "application/json; charset=UTF-8"
},
"matchingRules": {
"$.body.token": {
"match": "regex",
"regex": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ8.eyJpc3MiOiJhZy1zdGFnaW5nLW1vYmlsZUBhcHBzcG90LmdzZXJ2aWNlYWNjb3VudC5jb20iLCJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImV4cCI6MTY0NjMxNjU5NiwiaWF0IjoxNjQ2MzEyOTk2LCJzdWIiOiJhZy1zdGFnaW5nLW1vYmlsZUBhcHBzcG90LmdzZXJ2aWNlYWNjb3VudC5jb20iLCJ1aWQiOiI0MTEwMDAzNyJ9.YQKzgFAmYGYi_ygkhBHVp6INGBsOuxGTwYFuwORovjx6uLM8Vs5m7DOa8BpLKfoZ9dSSm8XgsDeSsPH4c6C80eCm5kjJzhCYfI1_GL8uvkpWjqtT7jION7ybQZOoNMJ4rYTb4IyUOu06PG08VFBrt14uem-X_Kk_s-X_jnH2e81QHSvrM1ROCfDpkiDHic9S4op_zcaMPgKzC8vvJj5cY6Y11hPbhY2cb0z9BXIFql4S98rK96Hyw4JY2iWEt2dURtvYt-oyCWE4vP8uod3WEDZsrIc-3druPiZwbKp5Xx1S0MSuAwr8vs6mba5lkvreyoKNJAoxeHaJsnUigGl-Kg"
},
"$.headers.Content-Type": {
"match": "regex",
"regex": "application/json(;\\\\s?charset=[\\\\w\\\\-]+)?"
}
},
"status": 200
}
}
],
"metadata": {
"pact-jvm": {
"version": "4.3.5"
},
"pactSpecification": {
"version": "2.0.0"
}
},
"provider": {
"name": "OtacProviderService"
}
}
'Beth (pactflow.io/Pact Broker/pact-ruby)
"application/json(;\\\\s?charset=[\\\\w\\\\-]+)?" is not parsing properly.Beth (pactflow.io/Pact Broker/pact-ruby)
Not sure why the content type header changes as we dont set that explicitly in our testsCould you be getting a different version of pact-jvm in some builds?
Beth (pactflow.io/Pact Broker/pact-ruby)
859: unexpected token atCan you locate character 859?
Thomas K
01/25/2023, 8:42 AMau.com.dius.pact.consumer:junit5:4.3.5Thomas K
01/25/2023, 8:51 AMThomas K
01/25/2023, 8:52 AMThomas K
01/25/2023, 8:53 AM"application/json(;\\\\s?charset=[\\\\w\\\\-]+)?" in there anywhere 😕 will keep an eye out to see if this issue pops up again, its been pretty random and infrequentThomas K
01/25/2023, 8:56 AMBeth (pactflow.io/Pact Broker/pact-ruby)