-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couldn't start Pact Verifier process with PID #30
Comments
hi, @jonoc330. Have you tried:
Please post a screenshot of command you try to run in terminal and output of it's execution. |
Thanks @ichyr ! I haven't tried running it with a different port, although I'm not entirely sure pact-node gives you the option to. How would I go about doing that? Killed all processes node related (even just ended up restarting my computer at one point), and the PIDs being outputted arent being used. |
Running with different port is shown here: https://github.com/pact-foundation/pact-node#create-pact-mock-server Full example can be seen few line higher. |
@ichyr that's for consumer contract creation right? I'm attempting to verify on the provider side. Assumed the provider lib was doing that for me. |
Hi @jonoc330 - any chance you could provide a gist of the Assuming you have tried the usual process removal of This library essentially wraps an underlying Ruby process, so it's possible to rule in/out JS issues if you can't run it directly. |
https://gist.github.com/jonoc330/9916ce6f6e44db213f43d66dcd13ff24 I'll try running it directly. |
Looks pretty reasonable, although I'm guessing you've sanitised things? Let us know how the direct execution goes, that should help us rule out a few things. |
So interestingly enough, running it via direct execution works perfectly! Command I ran: ./pact-provider-verifier --provider-base-url=http://localhost:8080 --pact-urls=/path/to/contract.json --provider-states-url=http://localhost:8080/states --provider-states-setup-url=http://localhost:8080/setup |
I've seen this sort of issue before. I'm wondering if it's like some sort of network configuration - e.g. perhaps it's listening on Next steps would be to confirm the arguments flowing through to the mock service are correct (as per your manual steps) and then to see if the mock server is actually starting, but node is unable to connect. e.g. you should be able to run a |
Arguments flowing through from node: pact-provider-verifier --provider-base-url "http://localhost:8080" --pact-urls "/path/to/contract.json" --provider-states-url "http://localhost:8080/states" --provider-states-setup-url "http://localhost:8080/setup" Basically the same thing. |
Okay i've figured it out. The timeout is set to 10000ms which isn't long enough for the pacts to fail and return. I'm purposefully failing my pact verification at the moment which takes 51.34 seconds in a direct execution run. It's actually working in the background and verifying the pacts but the Node code assumes a long run time = failed start of the pact verifier process.
|
Interesting, I think we should make this timeout configurable (and also fix the error message - it's misleading). I'll look into this. Also, great work :) |
Awesome, that'll help loads. Cheers for your help Matt! |
No worries, take a look at PR #31 if you're desperate for a fix in the meanwhile. |
|
Hi guys, I recently started writing some code to verify pacts. For some reason every time I get "Couldn't start Pact Verifier process with PID: *" even though I've tried cleaning running instances. Any advice you guys could give for getting around this issue? On Mac OS.
The text was updated successfully, but these errors were encountered: