HTTP Request not working for external addresses

Hi,

today I did upgrade to NR 3.1.3 and my HTML grabbing node does not work anymore. I can connect to internal HTTP servers, but not to https://www.google.com or https://www.orf.at. Always get the error err_invalid_arg_type. The debug node result:
RequestError: The "listener" argument must be of type function. Received an instance of Object :

What can I do?

Welcome to the forum @grasgruen.it

What version of nodejs are you using? (node -v will tell you).
Check in Manage Palette that you are using the latest versions of all nodes.

Create a short flow showing the problem (preferably something like an Inject node and your grabber node), export it and paste it here. When posting flows it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

See this post for more details - How to share code or flow json

Thank you Colin

I did upgrade node an npm also:
root@HS:~# node -v
v20.11.0
root@HS:~# npm -v
10.2.4

Tested with a really simple flow: Inject, grab www.google.com, debug

[{"id":"332c9c1037916df6","type":"http request","z":"d9e433358a9f7508","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://www.google.com","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":290,"y":70,"wires":[["c830d56455774201"]]},{"id":"0872f32f86c21710","type":"inject","z":"d9e433358a9f7508","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":70,"wires":[["332c9c1037916df6"]]},{"id":"c830d56455774201","type":"debug","z":"d9e433358a9f7508","name":"debug 97","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":450,"y":70,"wires":[]}]

"RequestError: The "listener" argument must be of type function. Received an instance of Object : https://www.google.com"

No error here:

When do you get that error - upon deploy? upon clicking inject?

Can you show us a screen clip of that error? In particular the part of the debug message that shows where the error is coming from?

image

Also, can you show us what contrib nodes you have installed.

Lastly, where is node-red running (on OS? in docker/container? on a dedicated hardware like an industrial IoT unit) and does the Node-RED itself have internet access)

is this related to ipv6 priority again ?

Not sure. Leaning towards monkey patches and agent-base or some combination.

There are a ton searches, nothing to do with Node-RED or GOT for the phrase The "listener" argument must be of type function - Google Search.

So just gathering info for now Dave.

Disabled IPv6 and rebooted. Still got the same error upon inject.

But now I did remove all unneeded nodes and updated the rest and it is working again. Sorry, I missed that hint in your post @Colin .

Thank you all.

Would be good to know which nodes you removed - it would confirm my suspicion...

... and would be super useful info for future users encountering the same issue

Sorry, it was a mass of nodes which I deleted. Cannot tell. Do you suspect some specific nodes?

root@HS:~# node-red-admin list
Nodes                                                                 Types                      State
node-red-contrib-aggregator/aggregator                                aggregator                 enabled
node-red-contrib-bigtimer/bigtimer                                    bigtimer                   enabled
node-red-contrib-counter/counter                                      counter                    enabled
node-red-contrib-cron-plus/cronplus                                   cronplus                   enabled
node-red-contrib-fs-ops/fs-ops                                        fs-ops-move                enabled
                                                                      fs-ops-copy
                                                                      fs-ops-delete
                                                                      fs-ops-access
                                                                      fs-ops-size
                                                                      fs-ops-stats
                                                                      fs-ops-link
                                                                      fs-ops-type
                                                                      fs-ops-dir
                                                                      fs-ops-mkdir
                                                                      fs-ops-mktmpdir
node-red-contrib-ftp-server/ftp-server                                ftp-server                 enabled
node-red-contrib-google-home-notify-volume-adjustable/google-notify   googlehome-config-node     enabled
                                                                      googlehome-notify
node-red-contrib-image-output/image                                   image                      enabled
node-red-contrib-light-scheduler/light-scheduler                      light-scheduler            enabled
node-red-contrib-light-scheduler/light-scheduler-filter               light-scheduler-filter     enabled
node-red-contrib-light-scheduler/light-scheduler-settings             light-scheduler-settings   enabled
node-red-contrib-loop-processing/array-loop                           array-loop                 enabled
node-red-contrib-loop-processing/index-loop                           counter-loop               enabled
node-red-contrib-loop-processing/while-loop                           while-loop                 enabled
node-red-contrib-moment/humanizer                                     humanizer                  enabled
node-red-contrib-moment/moment                                        moment                     enabled
node-red-contrib-nexmo/auth                                           nexmovoiceapp              enabled
                                                                      nexmobasic
node-red-contrib-nexmo/insight                                        numberinsight              enabled
node-red-contrib-nexmo/ncco                                           talk                       enabled
                                                                      stream
                                                                      input
                                                                      record
                                                                      conversation
                                                                      connect
                                                                      notify
node-red-contrib-nexmo/nexmo_apps                                     updateNexmoApp             enabled
node-red-contrib-nexmo/nexmo_webhooks                                 voice webhook              enabled
                                                                      return ncco
node-red-contrib-nexmo/number                                         updateNumber               enabled
node-red-contrib-nexmo/sms_rest                                       sendsms                    enabled
node-red-contrib-nexmo/vapi_rest                                      createcall                 enabled
                                                                      getrecording
                                                                      earmuff
                                                                      mute
                                                                      hangup
                                                                      transfer
                                                                      playaudio
                                                                      playtts
                                                                      playdtmf
node-red-contrib-nexmo/verify                                         sendverify                 enabled
                                                                      checkverify
                                                                      cancelverify
                                                                      nextverify
                                                                      searchverify
node-red-contrib-persist/persist                                      persist-store              enabled
                                                                      persist in
                                                                      persist out
node-red-contrib-string/string                                        string                     enabled
node-red-contrib-time-range-switch/time-range-switch                  time-range-switch          enabled
node-red-contrib-tplink/kasa                                          kasa                       enabled
node-red-dashboard/ui_audio                                           ui_audio                   enabled
node-red-dashboard/ui_base                                            ui_base                    enabled
node-red-dashboard/ui_button                                          ui_button                  enabled
node-red-dashboard/ui_chart                                           ui_chart                   enabled
node-red-dashboard/ui_colour_picker                                   ui_colour_picker           enabled
node-red-dashboard/ui_date_picker                                     ui_date_picker             enabled
node-red-dashboard/ui_dropdown                                        ui_dropdown                enabled
node-red-dashboard/ui_form                                            ui_form                    enabled
node-red-dashboard/ui_gauge                                           ui_gauge                   enabled
node-red-dashboard/ui_group                                           ui_group                   enabled
node-red-dashboard/ui_link                                            ui_link                    enabled
node-red-dashboard/ui_numeric                                         ui_numeric                 enabled
node-red-dashboard/ui_slider                                          ui_slider                  enabled
node-red-dashboard/ui_spacer                                          ui_spacer                  enabled
node-red-dashboard/ui_switch                                          ui_switch                  enabled
node-red-dashboard/ui_tab                                             ui_tab                     enabled
node-red-dashboard/ui_template                                        ui_template                enabled
node-red-dashboard/ui_text                                            ui_text                    enabled
node-red-dashboard/ui_text_input                                      ui_text_input              enabled
node-red-dashboard/ui_toast                                           ui_toast                   enabled
node-red-dashboard/ui_ui_control                                      ui_ui_control              enabled
node-red-dygraphs/dygraph                                             dygraph                    enabled
node-red-node-base64/base64                                           base64                     enabled
node-red-node-email/email                                             e-mail                     enabled
                                                                      e-mail in
                                                                      e-mail mta
node-red-node-openweathermap/openweathermap                           openweathermap             enabled
                                                                      openweathermap in
node-red/batch                                                        batch                      enabled
node-red/catch                                                        catch                      enabled
node-red/change                                                       change                     enabled
node-red/comment                                                      comment                    enabled
node-red/complete                                                     complete                   enabled
node-red/CSV                                                          csv                        enabled
node-red/debug                                                        debug                      enabled
node-red/delay                                                        delay                      enabled
node-red/exec                                                         exec                       enabled
node-red/file                                                         file                       enabled
                                                                      file in
node-red/function                                                     function                   enabled
node-red/global-config                                                global-config              enabled
node-red/HTML                                                         html                       enabled
node-red/httpin                                                       http in                    enabled
                                                                      http response
node-red/httpproxy                                                    http proxy                 enabled
node-red/httprequest                                                  http request               enabled
node-red/inject                                                       inject                     enabled
node-red/JSON                                                         json                       enabled
node-red/junction                                                     junction                   enabled
node-red/link                                                         link in                    enabled
                                                                      link out
                                                                      link call
node-red/mqtt                                                         mqtt in                    enabled
                                                                      mqtt out
                                                                      mqtt-broker
node-red/range                                                        range                      enabled
node-red/rbe                                                          rbe                        enabled
node-red/sort                                                         sort                       enabled
node-red/split                                                        split                      enabled
                                                                      join
node-red/status                                                       status                     enabled
node-red/switch                                                       switch                     enabled
node-red/tcpin                                                        tcp in                     enabled
                                                                      tcp out
                                                                      tcp request
node-red/template                                                     template                   enabled
node-red/tls                                                          tls-config                 enabled
node-red/trigger                                                      trigger                    enabled
node-red/udp                                                          udp in                     enabled
                                                                      udp out
node-red/unknown                                                      unknown                    enabled
node-red/watch                                                        watch                      enabled
node-red/websocket                                                    websocket in               enabled
                                                                      websocket out
                                                                      websocket-listener
                                                                      websocket-client
node-red/XML                                                          xml                        enabled
node-red/YAML                                                         yaml                       enabled

When you say deleted do you mean you uninstalled them, or just removed them from the flows?

They were not used (anymore) in the flows and I did uninstall them from the palette.

Specifically, which node packages did you uninstall from the palette manager?

Sorry, I cannot tell. It were about 20.