Http request throws error after nodejs update

Hey there,
I updated from nodejs 14 to 18 and re-installed node red.

Now, when I use the original example at
https://cookbook.nodered.org/http/simple-get-request
I get

[error] [http request:874a3d4e.9b666] RequestError: Expected value which is `predicate returns truthy for any value`, received values of types `Function`.

Any advice?

Note: the same http request works with node-red-contrib-http-custom-port-raw - but I'd rather want to use the standard module.

Hi @pebl-hank - welcome to The forums.

Can you confirm you're using the example as is, without modification? - i.e to get the latest Node RED version, if you are not, can please share an export of your flow?

I assume you are using the latest Node RED version?

The example work fine for me

I used the example code without modifications in a new flow.
Installed the latest version with

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node18

Even with node20 it's same result.

Can you share your Node RED start up log?

Works fine on NR 3.1.0 and Node 16

could you try downgrading to Node16?

Anyone else running Node-RED 3.1 + Node18 - could you give the flow a try out please?

Working fine with the below fingerprint

9 Oct 12:59:21 - [info] Node-RED version: v3.1.0
9 Oct 12:59:21 - [info] Node.js  version: v18.12.0
9 Oct 12:59:21 - [info] Windows_NT 10.0.19045 x64 LE

The log looks like this:

Started Node-RED graphical event wiring tool.
9 Oct 14:25:33 - [info]
Willkommen bei Node-RED
===================
9 Oct 14:25:33 - [info] Node-RED Version: v3.1.0
9 Oct 14:25:33 - [info] Node.js  Version: v20.8.0
9 Oct 14:25:33 - [info] Linux 6.1.21-v8+ arm LE
9 Oct 14:25:34 - [info] Paletten-Nodes werden geladen
9 Oct 14:25:39 - [info] Dashboard version 3.6.0 started at /ui
9 Oct 14:25:40 - [info] Einstellungsdatei: /home/pi/.node-red/settings.js
9 Oct 14:25:40 - [info] Kontextspeicher: default [module=memory]
9 Oct 14:25:40 - [info] Benutzerverzeichnis: /home/pi/.node-red
9 Oct 14:25:40 - [warn] Projekte deaktiviert: editorTheme.projects.enabled=false
9 Oct 14:25:40 - [warn] Name der Flows-Datei nicht festgelegt. Name wird unter Verwendung des Hostnamens generiert.
9 Oct 14:25:40 - [info] Flow-Datei: /home/pi/.node-red/flows_raspberrypi.json
9 Oct 14:25:40 - [info] Server wird jetzt auf http://127.0.0.1:1880/ ausgeführt
9 Oct 14:25:40 - [warn]
---------------------------------------------------------------------
Die Datei mit den Flow-Credentials wird mit einem vom System
generierten Schlüssel verschlüsselt.
Wenn der vom System generierte Schlüssel aus irgendeinem Grund
verloren geht, kann die Datei mit den Credentials nicht
wiederhergestellt werden. Sie muss dann gelöscht und die
Credentials müssen erneut eingestellt werden.
Es sollte ein eigener Schlüssel mit Hilfe der Option
'credentialSecret' in der Einstellungsdatei vorgegeben werden.
Node-RED wird dann die Datei mit den Flow-Credentials
bei der nächsten Übernahme (deploy) einer Änderung erneut
verschlüsseln.
---------------------------------------------------------------------
9 Oct 14:25:41 - [info] Flows werden gestartet
9 Oct 14:25:44 - [info] Flows sind gestartet
9 Oct 14:26:03 - [error] [http request:874a3d4e.9b666] RequestError: Expected value which is `predicate returns truthy for any value`, received values of types `Function`.
9 Oct 14:26:03 - [error] [http request:874a3d4e.9b666] RequestError: Expected value which is `predicate returns truthy for any value`, received values of types `Function`.

And to leave no stone unturned - please share the flow.

Working fine on Windows 11/Edge/Node 18/NR 3.1

1 Like

Here is the flow:

[{"id":"279bcc84610bb261","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"d88dd470.0ac7b8","type":"inject","z":"279bcc84610bb261","name":"make request","repeat":"","crontab":"","once":false,"topic":"","payload":"","payloadType":"date","x":290,"y":140,"wires":[["874a3d4e.9b666"]]},{"id":"874a3d4e.9b666","type":"http request","z":"279bcc84610bb261","name":"","method":"GET","ret":"txt","url":"https://nodered.org","tls":"","x":454.5,"y":140,"wires":[["90243cc1.87edc"]]},{"id":"7403c68f.21d7c8","type":"debug","z":"279bcc84610bb261","name":"","active":true,"console":"false","complete":"false","x":810,"y":140,"wires":[]},{"id":"90243cc1.87edc","type":"html","z":"279bcc84610bb261","name":"","property":"","tag":".node-red-latest-version","ret":"text","as":"single","x":631.5,"y":140,"wires":[["7403c68f.21d7c8"]]}]

Ok entirely normal - just one of those things that needed to be asked :angel:

OK, I think I narrowed it down.
As soon as I install one of these pallettes, the described issue rises:

node-red-contrib-cul         <-- The one I am using currently
@johfer/node-red-contrib-cul
node-red-contrib-cul-max

I raised an issue here

but I'm not sure the package is still maintained. Is there anything I can do? I really need this pallette to be working.

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