# HTTP Request not working for external addresses

**URL:** https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926
**Category:** General
**Tags:** http-request
**Created:** [25 January 2024 21:15 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926 "2024-01-25T21:15:44Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![grasgruen.it](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@grasgruen.it](https://discourse.nodered.org/u/grasgruen.it)
#### Post date: [25 January 2024 21:15 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/1 "2024-01-25T21:15:44Z")

</div>

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](https://www.google.com) or [https://www.orf.at](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?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 January 2024 21:47 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/2 "2024-01-25T21:47:03Z")

</div>

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.

> [@grasgruen.it](#):
>
> What can I do?

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 `````)

````auto
``` 
   code goes here 
```

````

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

### Author: ![grasgruen.it](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@grasgruen.it](https://discourse.nodered.org/u/grasgruen.it)
#### Post date: [26 January 2024 07:02 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/3 "2024-01-26T07:02:05Z")

</div>

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](http://www.google.com), debug

```auto
[{"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](https://www.google.com)"

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 January 2024 08:14 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/4 "2024-01-26T08:14:51Z")

</div>

No error here:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/3/d3e039ed3a1bc341664b203289edf5d99588e1d4.png)

> [@grasgruen.it](#):
>
> "RequestError: The "listener" argument must be of type function. Received an instance of Object

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/db90b919bf4f83d17380f6d7e4d37dfc15c24c75.png)

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)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [26 January 2024 08:42 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/5 "2024-01-26T08:42:29Z")

</div>

is this related to ipv6 priority again ?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 January 2024 08:51 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/6 "2024-01-26T08:51:41Z")

</div>

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](https://www.google.com/search?q=The+%22listener%22+argument+must+be+of+type+function).

So just gathering info for now Dave.

---

<div class="post-metadata">

### Author: ![grasgruen.it](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@grasgruen.it](https://discourse.nodered.org/u/grasgruen.it)
#### Post date: [26 January 2024 09:38 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/7 "2024-01-26T09:38:37Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 January 2024 10:12 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/8 "2024-01-26T10:12:20Z")

</div>

> [@grasgruen.it](#):
>
> I did remove all unneeded nodes and updated the rest and it is working again

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

> [@Steve-Mcl](#):
>
> Also, can you show us what contrib nodes you have installed.

> [@Steve-Mcl](#):
>
> Leaning towards monkey patches and agent-base or some combination

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

---

<div class="post-metadata">

### Author: ![grasgruen.it](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@grasgruen.it](https://discourse.nodered.org/u/grasgruen.it)
#### Post date: [26 January 2024 10:45 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/9 "2024-01-26T10:45:17Z")

</div>

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

```auto
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

```

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [26 January 2024 10:47 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/10 "2024-01-26T10:47:57Z")

</div>

> [@grasgruen.it](#):
>
> it was a mass of nodes which I deleted

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

---

<div class="post-metadata">

### Author: ![grasgruen.it](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@grasgruen.it](https://discourse.nodered.org/u/grasgruen.it)
#### Post date: [26 January 2024 11:13 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/11 "2024-01-26T11:13:25Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 January 2024 11:31 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/12 "2024-01-26T11:31:12Z")

</div>

> [@grasgruen.it](#):
>
> I did uninstall them from the palette.

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

---

<div class="post-metadata">

### Author: ![grasgruen.it](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@grasgruen.it](https://discourse.nodered.org/u/grasgruen.it)
#### Post date: [26 January 2024 12:21 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/13 "2024-01-26T12:21:16Z")

</div>

Sorry, I cannot tell. It were about 20.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [25 April 2024 12:21 UTC](https://discourse.nodered.org/t/http-request-not-working-for-external-addresses/84926/14 "2024-04-25T12:21:36Z")

</div>

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