Hi all, We are using pacts as part of our project...
# general
r
Hi all, We are using pacts as part of our project, and we are using 4.0.10 version in pact . It was working earlier fine but now we are failing issue while running the provider tests. Can someone pls help us here. Is this a known issue and is the fix available? We are getting initialisation error as stated below is the error log:
Unexpected character 'EOI(null)' at position '3', expecting '[DOT]'
at app//com.github.zafarkhaja.semver.VersionParser.consumeNextCharacter(VersionParser.java:516)
at app//com.github.zafarkhaja.semver.VersionParser.parseVersionCore(VersionParser.java:288)
at app//com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:255)
at app//com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:195)
at app//com.github.zafarkhaja.semver.Version.valueOf(Version.java:265)
at app<//au.com>.dius.pact.core.model.DefaultPactReader.loadPact(PactReader.kt:177)
at app<//au.com>.dius.pact.provider.junit.loader.PactBrokerLoader.loadPact(PactBrokerLoader.kt:203)
at app<//au.com>.dius.pact.provider.junit.loader.PactBrokerLoader.loadPactsForProvider(PactBrokerLoader.kt:155)
at app<//au.com>.dius.pact.provider.junit.loader.PactBrokerLoader.load(PactBrokerLoader.kt:92)
at app<//au.com>.dius.pact.provider.junit.PactRunner.initialize(PactRunner.kt:85)
at app<//au.com>.dius.pact.provider.junit.PactRunner.getChildren(PactRunner.kt:140)
at app//org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:534)
at app//org.junit.runners.ParentRunner.getDescription(ParentRunner.java:400)
at app//org.junit.runners.model.RunnerBuilder.configureRunner(RunnerBuilder.java:81)
at app//org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:72)
m
Looks like a question for #C9UN99H24
๐Ÿ‘ 1
โ˜๏ธ 1
b
What's the consumer (contract) version number for the contract(s) you're trying to verify? It looks like Pact has some trouble parsing the semantic version (semver)
r
We are using version 4.0.10 for pact. Is that what you are asking for @Bas Dijkstra
b
No, I meant the consumer app version associated with the contract
r
I see this present as following in our build.gradle: file
Copy code
pact {
  publish {
    version = "1.0"
  }
Is this what you are referring to?
b
Yes, I think itโ€™s expecting a proper semver, for example
1.0.0
, could you try that instead?
r
Okay , will try to do that. Thanks!
๐Ÿ‘ 1
m
Let us know how you go, thanks for the tip Bas
r
The error was with the version uploaded by consumer actually they changed the version for the pact that ewas having major , minor version but not the patch version hence we were getting this error.
b
Thank you for letting us know!
m
Thanks for letting us know. Btw this version is very very old, I highly recommend upgrading to something newer and supported
r
Sure, will do the update .