Closed kmassicotte closed 4 years ago
Hi @kmassicotte - based on your logs it seems that the old ntlm-proxy instance is too slow to remove the portsfile. The plugin then picks up the old ports file and tries to connect to it, but it is already closed.
To validate this, you could reverse the launch order - start cypress-ntlm first and then start the proxy (cypress-ntlm will wait up to 15 seconds for the proxy to be available).
I think the plugins startup logic needs to be reconsidered, this is the seconds issue related to timing during startup.
Hi @bjowes , tried that approach this morning but encountering the same behaviour. The "failed to contact ntlm-proxy" logs occur once I've run ntlm-proxy in the other tab.
This is really weird! Could you try launching the ntlm-proxy and then sending a request to it (using curl or postman for instance). Use the configApiUrl from the logs of the ntlm-proxy and add /alive
to it, send as a GET request. As an example, using the logs in your first post, you would do a GET request to http://127.0.0.1:40667/alive
.
The ntlm-proxy should respond to that, and that is also how cypress-ntlm tries to connect to it.
Since cypress-ntlm can't connect, I am suspecting you have a firewall interfering with the traffic. If this is the case, the described GET request above should fail too.
Indeed, after investigating more, curl was returning the gateway html but Insomnia was returning 200 OK. The issue was an incorrectly set no_proxy
value.
Sorry for the trouble and thanks for your help!
Hello!
I had an early version of this plugin working, but it seems that I'm unable to contact the ntlm-proxy with the latest versions of Cypress (3.7.0) and cypress-ntlm-auth (2.0.5).
Log output on
DEBUG=cypress:plugin:ntlm-auth $(npm bin)/ntlm-proxy
command:In another terminal tab, on
DEBUG=cypress:plugin:ntlm-auth $(npm bin)/cypress-ntlm
:I searched through the issues but haven't found something similar. Any ideas?
Kind regards, KM