Probems with http request-Node: ERR_GOT_REQUEST_ERROR

Hey,

i reinstalled node-red. Current version is 4.0.5. I transfered the flows. Everything is working fine - except the htttp request nodes. I've got such a error on every single node:

Can maybe somebody help? Is there any possibility to debug a little bit further?

Best greats and have a nice weekend!

Have you selected Use Proxy in the http node?

How did you do this?

If there are credentials involved & you simply imported a backup, the credentials may be lost.

Also, which nodes is it that are showing those errors in the debug pane?

No i didn't. Do i need to use it? Most of the http-request-nodes are network-internal. So they only access other devices in the same network.

No credentials involved. I can also send the same requests via postman on windows.
I copied the complete .node-red folder with the flows-files

Upper error is triggered by the xml node. The second error is the error of the http request itsself.

Ok, hopefully you did not copy node_modules and you ran npm install inside the destination .node-red folder? to get updates & run compilation steps for nodes with binaries?

Would probably be worth deleting the package-lock.json and running npm install inside .node-red to get any updates too.

I tried without copying this folder (and instead runing npm install) but it also dont work. In this case my knx-ultimate-config doesnt work and crashes. With copying only the http request nodes dont work.

I'm just desperate...

Can you capture the full error using a catch node

add catch node + debug

catch node

http settings settings

debug settings

then copy the full msg using the copy value button

and paste it into a code block

```
paste copied msg in between 3 back ticks like this
```


{"payload":1731956852032,"topic":"","_msgid":"16258161e26933d2","error":{"message":"RequestError: Expected value which is `predicate returns truthy for any value`, received values of types `Function`.","source":{"id":"b589c63c7527ecfa","type":"http request","count":1},"stack":"RequestError: Expected value which is `predicate returns truthy for any value`, received values of types `Function`.\n    at Request._destroy (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/core/index.js:482:21)\n    at _destroy (node:internal/streams/destroy:109:10)\n    at Request.destroy (node:internal/streams/destroy:71:5)\n    at Request.flush (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/core/index.js:241:22)\n    at lastHandler (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/create.js:37:26)\n    at iterateHandlers (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/create.js:49:28)\n    at got (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/create.js:69:16)\n    at HTTPRequest._inputCallback (/usr/local/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/21-httprequest.js:602:13)\n    at /usr/local/lib/node_modules/node-red/node_modules/@node-re..."}}

According to that error, you have nested search params in your query.
ref: searchParams working differently to qs in request · Issue #2083 · sindresorhus/got · GitHub

can you:

  1. add a FULL debug BEFORE the HTTP request, capture the FULL msg that goes into the REQUEST node & paste it in a reply
  2. select the INJECT and the HTTP node (only the one that is failing) and export it (CTRL-E) and paste it in a reply

PS, please use the reply button attached to the message you are replying to (not the one at the very bottom) otherwise we dont get a notification

DEBUG:

{"payload":1732119449450,"topic":"","_msgid":"416a7c4c605b7c2f"}

So only the timestamp will be sended as payload and a empty topic. After that first try i tried to clear the sending-data so the inject looks like this:

But nothing changed. Now it looks like this:

This is the config of one of the http-request-nodes:

Hmm, i ecpected the catch node to catch the error and show me more than what you have posted.

did you point the catch node at the HTTP node?

Which debug did that message come out of?

Probably better to use separate debugs for HTTP and CATCH (and name them too)

flows(4).json (834 Bytes)
Here is the export of my flow (inject, request , etc.)

Yes i point it to the http node:

The debug message of the catch node says: