Open FelixWhitefield opened 1 week ago
The proxied socket that you point out will only be created if the HTTPS_PROXY
environment variable is set and the url that you're dealing successfully is honored by the logic in this dependency. Is it possible that there is a difference in how/what environment variables are set between the success and failure scenarios?
Thank you for your reply.
The environment variables should be the same between the success and failure scenarios as they happen within the same cypress open session. I retry the test locally by clicking the retry button in the Cypress app.
When running the tests I am connected to a corporate VPN as the server hosting the site is in our corporate network and is not accessible otherwise. Could that be a factor into the issue?
Current behavior
Currently I have a POST request which sometimes drops its body, as when checking with the server it is making the request to the body is empty and the Content-Length is 0. This happens rarely, potentially 1 in 20 times when running the test locally and on our CI pipeline.
The POST request comes from the site I am trying to test, and is triggered when a button is clicked on a page. It should have a JSON body.
When running Cypress open with the developer tools open and looking at the request in the network tab, the request has the correct body. But when debugging the server, the request has no body.
I have turned on Cypress Debug logging and have found that when the request body is dropped, Cypress seems to create a proxied socket for the request. But when the request body gets to the server, this does not happen.
Logs (relating to the failed request) Failure Logs - When the request body is dropped (No response from the server because it is being debugged and was stopped when the issue occurred):
Success Logs - When the request body makes it to the server:
We do have
cypress-ntlm-auth
installed, as we use NTLM for our authentication - in case it could be that plugin causing the issue.I am happy to provide more debug logging if the above does not suffice.
Desired behavior
Cypress should pass the request body through all the time
Test code to reproduce
I cannot reliable recreate the issue
Cypress Version
13.15.0
Node version
v20.11.1 on CI, v18.20.0 locally
Operating System
Windows 22631.4317 locally
Debug Logs
No response
Other
No response