Empty payload from http request after updated node-red

I run node-red on osx and after I upgraded node-red my http requests don’t work anymore.

I try to fetch a json-file from a server I’m hosting but payload is always empty. I run the exact same flow as I did before my upgrade where it worked just fine.

I check the traffic with wireshark and I see there is a complete response sent back to node-red but payload is empty. Response code is 200.

If I change the url to www.google.com I do get a response payload. But from my local server there is no response payload. I can access the same url from my browser or if I write a simple snippet in nodejs to do the request it works..

This is a very strange behaviour that started just after an upgrade.

Anyone seen a similar thing?

I remember i read about a similar issue a while back.
From what version of NR did you upgrade ?

Check this issue in node-red Github relating how redirects are handled and see if the suggestions help
with your problem.

Problem solved by upgrading nodejs from 14 to 16.


The NodeJS version "shouldn't" matter.

From 1.x to 2.x we swapped out the library (from request to got) used to make the http request and have tried very hard to make it's behaviour match.

You said you wrote some code to test, which library did you use?

We probably need some more information to workout what's going on.

  • Do you know what response headers your service sends with the JSON object?
  • What framework or http server is Node-RED connecting to?

Or if you could grab a packet capture of the request/response (e.g. with wireshark) that would be useful.

I made a small snippet with requests didn’t understand it was got nowadays :slight_smile:

I was communicating with a python flask server and also a small LTE routers built in web server.

Unfortunately I did not save the wireshark capture, I just verified that the content where sent from the web server to my computer running node-red.
Content length was correct and response code was 200. Just payload empty.

But all I did now was changed from node 14 to 16 and things just worked fine again.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.