Closed gultyayev closed 1 year ago
Are you running in corporate firewall/proxy service? (see https://github.com/pact-foundation/pact-js/blob/master/docs/troubleshooting.md#corporate-proxies--firewalls). One way to test/work around that, is to run the tests on a non-corporate machine/network.
I'd also check to see if any other service is running on your machine on the same port (e.g. localhost
might map to an ipv4 or ipv6 address, so you could be more specific by using something like 127.0.0.1
).
We really will need a repro that demonstrates the bug, but my instinct is it's a networking related issue on your machine.
I have another project that works on the same machine. So it shouldn't be network related
Tried to create a reproduction, but unable to do so. In another project it works as expected. Also, I noticed that if I try to run tests in pure JS in my project it does work. It doesn't work if I try running the code using ts-node. Doesn't make sense to me.
I'm going to close this as we have not been able to reproduce it and due to inactivity. We can re-open once there is a way we can reproduce.
Software versions
Issue Checklist
Please confirm the following:
Expected behaviour
Should make a request to my NestJS service.
Actual behaviour
Pact's proxy server doesn't make a request. It returns 404 HTML error page Cannot PUT ... My application doesn't print the request in the logs which means that it never received the request. (I also made the request manually to my local server and it was working which was also a proof that the server never received the request).
As a test I omitted local server bootstrap and the error persisted, which proved that my application isn't even in the equation. The error is thrown by pact's proxy Express server.
Steps to reproduce
I'm not sure if it's reproducible. We had a pact generated by Java consumer
headers:
body:
Relevant log files
P.S. In the logs it says that it sends a request to a provider at "http://127.0.0.1:64155/", but my providerBaseUrl is "http://localhost:3000", just in case.