# UPDATE / Resolved: Upgraded to 3.1 - http request nodes are now giving ERR\_TLS\_CERT\_ALTNAME\_INVALID error. Rolled back to 3.0, error is gone

**URL:** <https://discourse.nodered.org/t/update-resolved-upgraded-to-3-1-http-request-nodes-are-now-giving-err-tls-cert-altname-invalid-error-rolled-back-to-3-0-error-is-gone/86143>\
**Category:** General\
**Tags:** http-request, security, docker\
**Created:** [5 March 2024 06:11 UTC](https://discourse.nodered.org/t/update-resolved-upgraded-to-3-1-http-request-nodes-are-now-giving-err-tls-cert-altname-invalid-error-rolled-back-to-3-0-error-is-gone/86143 "2024-03-05T06:11:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sstratoti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sstratoti/32/82815_2.png) [@sstratoti](https://discourse.nodered.org/u/sstratoti)\
**Post date:** [5 March 2024 06:11 UTC](https://discourse.nodered.org/t/update-resolved-upgraded-to-3-1-http-request-nodes-are-now-giving-err-tls-cert-altname-invalid-error-rolled-back-to-3-0-error-is-gone/86143/1 "2024-03-05T06:11:26Z")

</div>

@TotallyInformation Finally figured this one out, and wanted to share the resolution!

> <https://github.com/node-red/node-red/issues/4324>
>
> \### Current Behavior
> 
> With \`latest\` image pushed today http request node funct…ionality in Docker seems to break.  
> 
> I have two scenarios which now have stopped working: 
> 1. A function node which formats the URL and passes it as \`msg.url\`, e.g.
> \`\`\`
> msg.url = "https://api.octopus.energy/v1/gas-meter-points/9999999999/meters/E6E00000000000/consumption/?period\_from=2023-08-30T00:00:00.000Z&period\_to=2023-09-08T00:00:00.000Z&page\_size=1000&group\_by=day"
> \`\`\`
> 2. A node which passed \`msg.payload\` as \`{"username":"user@email.com","password":"secretPassw0rd"}\` and the http request node containing the url as a POST \`https://api.pod-point.com/v5/auth\`
> 
> both scenarios return \`RequestError: connect ECONNREFUSED 127.0.0.1:443\`
> 
> I have rolled-back to \`3.0.2-14\` and the functions work again.
> 
> I do have a custom dockerfile as I need fabric installing also.
> 
> I notice in the logs for latest 
> 
> \`\`\`
> 6 Sep 17:36:03 - \[info\] Node-RED version: v3.1.0
> 6 Sep 17:36:03 - \[info\] Node.js version: v16.20.2
> 6 Sep 17:36:03 - \[info\] Linux 6.4.0-0.deb12.2-amd64 x64 LE
> 6 Sep 17:36:03 - \[info\] Loading palette nodes
> 6 Sep 17:36:05 - \[info\] Dashboard version 3.4.0 started at /ui
> (node:7) V8: /data/node\_modules/@throneless/libsignal-protocol/build/curve25519\_concat.js:20225 Invalid asm.js: Expected shift of word size
> \`\`\`
> 
> which doesn't get logged when I use 3.0.2-14. however 3.0.2-14 shows the following which latest doesn't:
> \`\`\`
> Patched https.request function detected. This will break the
> HTTP Request node. The original code has now been restored.
> This is likely caused by a contrib node including an old version of
> the 'agent-base@\<5.0.0' module.
> \`\`\`
> which is ironic as 3.0.2-14 http works and latest doesn't!
> 
> \### Expected Behavior
> 
> http request nodes correctly route the http request to the specified service.
> 
> \### Steps To Reproduce
> 
> 1. Build node-red with following dockerfile
> \`\`\`
> FROM nodered/node-red
> USER root
> RUN apk add py3-pip curl busybox-extras
> RUN pip3 install fabric
> \`\`\`
> 2. Create a http request node for an API service, either passing \`msg.url\` or passing \`msg.payload\` credentials, and deploy the flow
> 
> \### Example flow
> 
> \`\`\`
> \[
> {
> "id": "2e6a4fbc7fefd8de",
> "type": "http request",
> "z": "04d310a7ec5c4cb0",
> "name": "",
> "method": "GET",
> "ret": "obj",
> "paytoqs": "ignore",
> "url": "",
> "tls": "",
> "persist": false,
> "proxy": "",
> "insecureHTTPParser": false,
> "authType": "",
> "senderr": false,
> "headers": \[\],
> "x": 930,
> "y": 220,
> "wires": \[
> \[
> "fbba3e72e87b0d51"
> \]
> \]
> },
> {
> "id": "62517e98fb262d7d",
> "type": "inject",
> "z": "04d310a7ec5c4cb0",
> "name": "",
> "props": \[
> {
> "p": "payload"
> },
> {
> "p": "topic",
> "vt": "str"
> }
> \],
> "repeat": "",
> "crontab": "",
> "once": false,
> "onceDelay": 0.1,
> "topic": "",
> "payload": "",
> "payloadType": "date",
> "x": 500,
> "y": 220,
> "wires": \[
> \[
> "8d6cc960f014c193"
> \]
> \]
> },
> {
> "id": "fbba3e72e87b0d51",
> "type": "debug",
> "z": "04d310a7ec5c4cb0",
> "name": "debug 115",
> "active": true,
> "tosidebar": true,
> "console": false,
> "tostatus": false,
> "complete": "false",
> "statusVal": "",
> "statusType": "auto",
> "x": 1150,
> "y": 220,
> "wires": \[\]
> },
> {
> "id": "8d6cc960f014c193",
> "type": "function",
> "z": "04d310a7ec5c4cb0",
> "name": "get\_price\_data",
> "func": "var oct\_url = \\"https://api.octopus.energy/v1/products/SILVER-2017-1/gas-tariffs/G-1R-SILVER-2017-1-H/standard-unit-rates/?period\_from=2023-09-03T00:00:00Z&period\_to=2023-09-08T00:00:00Z\\"\\n\\nmsg.url = oct\_url;\\n\\nreturn msg;",
> "outputs": 1,
> "timeout": "",
> "noerr": 0,
> "initialize": "",
> "finalize": "",
> "libs": \[\],
> "x": 720,
> "y": 220,
> "wires": \[
> \[
> "2e6a4fbc7fefd8de"
> \]
> \]
> }
> \]
> \`\`\`
> 
> 
> \### Environment
> 
> \- Node-RED version: v3.1.0
> \- Node.js version: v16.20.2
> \- npm version:
> \- Platform/OS: Linux 6.4.0-0.deb12.2-amd64 x64 LE ( = latest linux/amd64 dockerfile image)
> \- Browser: Firefox 116.0.3 (64-bit) Windows 11

Because an older palette I had installed was using an older version of agent-base, it was breaking the http-response node. Which meant that it was only getting responses from my OWN nginx server.  
I cleared out a bunch of unused palette (I suspect the culprit was an old mqtt one...), restarted my docker container and viola - it works again.

The reason it worked in 3.0 vs 3.1 is that in 3.0 it used to "fix" it. Now it doesn't, which I suppose it a good thing. 🙂 Anyways, thanks for all the help talking it out!

```auto
---------------------------------------------------------------------
Patched https.request function detected. This will break the
HTTP Request node. The original code has now been restored.

This is likely caused by a contrib node including an old version of
the 'agent-base@<5.0.0' module.

You can identify what node is at fault by running:
   npm list agent-base
in your Node-RED user directory (/data).
---------------------------------------------------------------------

```

---

<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:** [3 June 2024 06:11 UTC](https://discourse.nodered.org/t/update-resolved-upgraded-to-3-1-http-request-nodes-are-now-giving-err-tls-cert-altname-invalid-error-rolled-back-to-3-0-error-is-gone/86143/2 "2024-06-03T06:11:28Z")

</div>

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