-
Notifications
You must be signed in to change notification settings - Fork 675
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
REST requests don't resolve in the browser if the response's status code is 204 #6005
Comments
Thank you for submitting this issue. We would love to assist you and diagnose it. However, we need a simple sample that we can easily run on our side in order to replicate the issue and research its cause. Without a sample, we are not able to figure out what's going on and why this issue occurs. We look forward to your response. |
email sent with sample |
We have received your email. We need some time to research the issue. |
@liwanma, |
Yes |
Hi @liwanma, The https://github.com/liwanma/testcafe-6005 repository is not accessible right now. Could you please restore access to it? |
This issue was automatically closed because there was no response to our request for more information from the original author. Currently, we don't have enough information to take action. Please reach out to us if you find the necessary information and are able to share it. We are also eager to know if you resolved the issue on your own and can share your findings with everyone. |
I had the same with a 204 response to a GET that have also a content-length header to 0 what is not recommended in rfc . |
Thank you for the additional information. Since the original example posted by the issue author is no longer accessible, could you please share an example that reproduces the issue (include the test code and the tested page URL)? |
It is a backend issue in my case so I requested change in my backend. |
I am glad that you were able to modify the backend to work around this issue. Unfortunately, we cannot research this issue further without an example, which we could run on our side to reproduce the problematic behavior. |
I have a similar issue. Front-end: react. Test cafe has an issue with the Delete API call. Steps to reproduce
After clicking the delete button, I can see the server has completed the delete request but in Chrome, it's not getting resolved while using TestCafe, it's working without the TestCafe server. Note: I have changed the Delete API to use the 200 status code. It started working. The difference in header between 204 and 200 was content type and content length. According to the standards, Content type is not mandatory: https://www.rfc-editor.org/rfc/rfc2616#section-7.2.1 |
Hello @suryap666, Please create a separate ticket using this template. |
What is your Test Scenario?
My project is a React SPA. I'm testing a form consisting of a password field and a submit button. When the submit button is clicked, I wait for a 204 response with an HTTPOnly cookie, then hide the form and show a table. If the cookie is already set when the page is loaded, the form is not shown.
What is the Current behavior?
Currently, the request hangs in the browser. In the network tab in devtools, the status is stuck on PENDING.
I created a custom request hook to see if I am actually getting a response. I am, but the client says the request is still pending.
Also, if I refresh the page while waiting for the request to resolve, the form is no longer shown (as if the request was in fact resolved and the cookie was set).
To further test my suspicions, I changed my API server to return a 200 status code (instead of 204) and the request resolved in the browser as expected.
What is the Expected behavior?
I expected the request to resolve in the browser.
What is your web application and your TestCafe test code?
Your complete test code (or attach your test files):
Your complete test report:
Your Environment details:
testcafe chrome -e test.js
The text was updated successfully, but these errors were encountered: