Closed sammachin closed 3 years ago
Hi, any news on this issue? it is safe to update to node-red 2.0?
Thank you
@mvivaldi Node RED 2.0.2 introduced a fix which removes the offending code that agent-base sets, this means tht the http request node will work properly, however its not possible to know if this breaks other nodes that rely on the old version of agent-base. Looking at the tree for this pacakge is quite a long way down and seems to only be part of proxy pacakges so I htink its unlikely that you would have an issue especially if you are not using node-red behind a proxy. However I'd reccomend testing this node against 2.0.5 with your use cases before upgrading production.
I upgraded node-red and everything seems fine! Thank you
Hi, thanks for reporting
I've updated the dependencies, the only package with still an old version of agent-base is recast.ai, the package was updated 3 years ago, recast.ai was acquired by sap, I think this node is dead. I'm removing it.
There seems to be a dependency left:
├─┬ node-red-contrib-chatbot@0.19.19
│ ├─┬ chat-platform@1.3.2
│ │ └─┬ npm@6.14.17
│ │ └─┬ npm-registry-fetch@4.0.7
│ │ └─┬ make-fetch-happen@5.0.2
│ │ ├─┬ http-proxy-agent@2.1.0
│ │ │ └── agent-base@4.3.0
│ │ ├─┬ https-proxy-agent@2.2.4
│ │ │ └── agent-base@4.3.0 deduped
│ │ └─┬ socks-proxy-agent@4.0.2
│ │ └── agent-base@4.2.1
… which causes this warning (that's probably the fix @sammachin mentioned):
Node-RED[121244]: ---------------------------------------------------------------------
Node-RED[121244]: Patched https.request function detected. This will break the
Node-RED[121244]: HTTP Request node. The original code has now been restored.
Node-RED[121244]: This is likely caused by a contrib node including an old version of
Node-RED[121244]: the 'agent-base@<5.0.0' module.
Node-RED[121244]: You can identify what node is at fault by running:
Node-RED[121244]: npm list agent-base
Node-RED[121244]: in your Node-RED user directory
Node-RED[121244]: ---------------------------------------------------------------------
Thanks @skolarianer, fixed in chatplatform@2.1.1 which will be released in few days in RedBot@1.0.0
Hi,
We've detected that your node has a dependency on an old version of
agent-base (<6.0.0)
, These old versions were patching a core node.js function in a way that could break other libraries - including one we started using in Node-RED 2.0 for the HTTP Request node. Therefore any users that upgrade to Node-RED 2.0 and have your node installed (or later try to install it) will get errors when using the http-request node.Could you please take a look at your dependencies and see if you can update the versions so that you are no longer dependent on agent-base before version 6.0.0
Note this could be a module that you are using has a dependency on agent-base so you might need to check for updates to that module, to help you we've attached your nodes dependency tree below
More details on this issue and the warning message that is now displayed in Node-RED 2.0.2 are on the forum at link https://discourse.nodered.org/t/node-red-2-0-2-released/48767
Thanks in advance for looking into this.
Sam
PS Sorry for the templated issue but we've got a number of nodes with the issue so I'm automating the issue creation.