-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
POST request drops body sporadically #30619
Comments
The proxied socket that you point out will only be created if the |
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? |
The corporate VPN could be part of the problem but hard to know for sure. Do you notice a pattern when you're in open mode? Does the first one fail and then a retry succeed or anything like that? Or is it sort of random? Also, you mentioned |
Apologies for the delay in my response. I would say that it's more likely to fail when I first open it, and then the more I retry it fails less and less to the point where it doesn't seem to fail anymore, until I restart open mode. There is a way to remove |
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
The text was updated successfully, but these errors were encountered: