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
Axios not receiving 204 response with Transfer-Encoding header in Node v14 #3473
Comments
Yes, Same issue i am also facing with Node v14 After upgrading to v14, i am not getting response back in UI. However the node js sending the response (debugged till last step). Also, if i hit the api via postman, it is getting response. Only in the application (where i am using axios), the response is not coming back. The status in console is keep on "Pending". |
I'm facing the same problem. With Postman / Soap UI I get a response but in my application the response gets lost in case of status code 204. Used Versions:
Used OS: Windows 10 |
The problem (hanging after the call) was spotted when Axios (any version) on node 14 calls node red api runnung on node 12. |
Hi, I think the major issue is that Axios is not very stable on v14. I am planning to work on that and then a v16 as soon as it lands in April. Thanks |
I have same issue. node v14.15.3 |
I'm facing same issue, for me it's happening with no content in response for status code 204 axios version 0.21.1 |
Is there a timeframe that this might get fixed? |
@joshuas2020 @VassilAtanasov Any update on this? Is anyone able to receive |
Hi @AdamCuculich |
Yes, it happens when no response body is received. My temporary solution was to just replace |
It's the issue with API response for me i.e fastapi tiangolo/fastapi#2832. Check for the following in your API response. status code: 204
|
Is this going to be addressed? this ticket has been open for 2 years |
is this being addressed elsewhere? |
It was very painful. I wasted my time on this. |
@jasonsaayman is this addressed in any new axios versions? |
For me, the issue was that a 204 expects no content in the response, but I believe my 204 was sending "null" as a response, which was tripping up axios. For those in a similar boat, ensure that the response doesn't have a response body at all. It should work then. |
Facing same issue, 200 followed by a 204, on Insomnia everything works fine, it's a simple node-react request with axios |
Samething here!
|
Describe the bug
After upgrading our node version to v14.15.1 our Axios requests in our express server never receive a response from an endpoint that returns 204 with header: 'Transfer-Encoding': 'chunked'.
I know we should not be receiving this (see here) but we do not have control of this endpoint.
Previously when we were on v10.23.0 of node we had no problem with receiving these responses.
I have tried the same request with the request library and am able to receive a response. See example below.
To Reproduce
Created a simple express server to demonstrate.
npm install axios express request
With the following index.js
Sending a GET request to http://localhost:8555/request will return 200 OK, whereas the request to http://localhost:8555/ will timeout/never receive a response.
Expected behavior
I am expecting that Axios should be able to receive the response from this server. Or I should be able to change some axios config to be able to receive this response.
Environment
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: