-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node causes Fatal error after upgrade to NR 3.1 and Node 20.8.1 (from NR 3.0.x and node 16.x.x.) #343
Comments
Hm I use node 18.12.2... never tried 20 |
I see on https://nodejs.org/en/download that 20.8.1 is now LTS. happened in last 24 hours. Will try and uninstall Node 20 and install 18 and see if that fixes this problem but very busy at present |
I just completely removed this Node from my flow and script, then added it back from palette and added one sender node (and BOT). Did not fix but at least the CPU hogging I say earlier which forced me to edit in safe mode didn't comeback. The two Nodes are (I removed my telegram username) OK, now to uninstall Node 20 and try Node 18... if I can |
I can upgrade and test it, too |
Just did the backwards step and reinstalled NR with node 18.15.2 and the Telegrambot node works. So the problem appears to be a compatibility issue with node 20.8.1. |
I updated to Node-Red v3.1.1 using docker image from here https://hub.docker.com/r/nodered/node-red: 23 Jan 18:17:53 - [info] Node-RED version: v3.1.3 Everything works here. Will try to upgrade nodejs on my windows |
Same issue Nodejs v20.5.1 Node-red v3.1.7 2024-03-26T15:41:51.940303+11:00 dave-linux Node-RED[888]: Unhandled rejection RequestError: AggregateError |
please try again with please try with new version 16.0.0 |
just tested new 16.00 version. |
16.0.1 on Node v20.5.1
2024-06-26T10:21:40.680484+10:00 dave-linux Node-RED[295624]: Unhandled rejection RequestError: AggregateError
2024-06-26T10:21:40.680594+10:00 dave-linux Node-RED[295624]: at new RequestError (/home/dave/.node-red/node_modules/request-promise-core/lib/errors.js:14:15)
2024-06-26T10:21:40.680659+10:00 dave-linux Node-RED[295624]: at Request.plumbing.callback (/home/dave/.node-red/node_modules/request-promise-core/lib/plumbing.js:87:29)
2024-06-26T10:21:40.680721+10:00 dave-linux Node-RED[295624]: at Request.RP$callback [as _callback] (/home/dave/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
2024-06-26T10:21:40.680803+10:00 dave-linux Node-RED[295624]: at self.callback ***@***.***/request/request.js:183:22 ***@***.***/request/request.js:183:22> )
2024-06-26T10:21:40.680889+10:00 dave-linux Node-RED[295624]: at Request.emit (node:events:514:28)
2024-06-26T10:21:40.680962+10:00 dave-linux Node-RED[295624]: at Request.onRequestError ***@***.***/request/request.js:869:8 ***@***.***/request/request.js:869:8> )
2024-06-26T10:21:40.681050+10:00 dave-linux Node-RED[295624]: at ClientRequest.emit (node:events:514:28)
2024-06-26T10:21:40.681119+10:00 dave-linux Node-RED[295624]: at TLSSocket.socketErrorListener (node:_http_client:495:9)
2024-06-26T10:21:40.681204+10:00 dave-linux Node-RED[295624]: at TLSSocket.emit (node:events:514:28)
2024-06-26T10:21:40.681295+10:00 dave-linux Node-RED[295624]: at emitErrorNT (node:internal/streams/destroy:151:8)
2024-06-26T10:21:40.681384+10:00 dave-linux Node-RED[295624]: at emitErrorCloseNT (node:internal/streams/destroy:116:3)
2024-06-26T10:21:40.681470+10:00 dave-linux Node-RED[295624]: at processTicksAndRejections (node:internal/process/task_queues:82:21)
From: spidgrou ***@***.***>
Sent: Monday, June 24, 2024 1:38 PM
To: windkh/node-red-contrib-telegrambot ***@***.***>
Cc: Dave Bowerman ***@***.***>; Comment ***@***.***>
Subject: Re: [windkh/node-red-contrib-telegrambot] Node causes Fatal error after upgrade to NR 3.1 and Node 20.8.1 (from NR 3.0.x and node 16.x.x.) (Issue #343)
just tested new 16.00 version.
With nodejs 20.14 still non working
—
Reply to this email directly, view it on GitHub <#343 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAX6MHDBL7OLTB3IMWC34XTZI6IBTAVCNFSM6AAAAAA6LYC7RSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBVGUZDEOJYGU> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AAX6MHHINJJQB5BEQNMTH3TZI6IBTA5CNFSM6AAAAAA6LYC7RSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUCIRXSS.gif> Message ID: ***@***.*** ***@***.***> >
|
maybe this solves the problem... will try to fix it |
Hi, how are you going with a fix? I have just built up a new Raspi 3B with latest versions of NR (4.0.2) and node (22.7) and v16.0.2 of node-red-contrib-telegrambot and unfortunately the original problem still exists. I reinstalled node 18.20 (remained with NR 4.0.2) and problem went away. So we cannot move away from node 18 LTS and it will eventually not be supported by later NR. I did see these warnings in NR when I installed node-red-contrib-telegrambot through the pallete into NR 4.0.2. Mainly depreciation warnings `----------------------------------------------------------- 2024-09-03T09:20:26.969Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --omit=dev --engine-strict [email protected] |
I can concur that I had the same issue with the NodeRED 4.0.2 docker container. Had to revert to the 3.1.x container to get it working again. |
As Karl-Heinz appears to be off line at present (we all have other commitments) I thought I would try to help as I have a Raspi setup and can use to experiment.
Any thoughts or am I missing something. I will set this up (first timer for inserting my 'own' node into Node-red) on my spare Raspi 3B with mode 18, then 20 then 22 and see if the Errors go away. |
Hi all … sorry for delay. I am busy all the time and was not able to shift priorities to this project. Maybe next week when the weather will turn bad I will find some minutes to investigate that issue. |
I installed Next step will be updating to 20.17.0 on my raspi to see if that causes the same problem. |
Karl, Progress. Some ObservationsMy setup does not use SOCKs so the code as written will overwrite and SOCKs settings in options.request My system at the main router and modem does not have IPv6 enabled but the Raspi shows from "ip -a" 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 in Node 20 could this be fooling the node to think there is a IPv6 available, when it doesn't connect through? Hope this helps, happy to trial any improvements. In meantime I will play with this a bit more to improve. |
I have found the Cause and interim solutionHome network has no IPv6 connection but Raspi has IPv6 enabled, even a IPv6 address (command |
Hi @WombatHollow thanks for your help. I recently upgraded to nr4 and nodejs20 and everything worked on my laptop. And yes I have IPV6 disabled in my router. I guess if that is a general problem then it should also be reproducable not only on a raspi. I have one here but debugging remotely must be set up first. So I try to enable IPV6 on my laptop and then we will see... |
Please try version 16.1.0 and let me know if it changed something |
Thanks for that Karl.
I can confirm that that fix works on my development Raspi3B+ with IPv6
enabled
16 Sep 18:54:33 - [info] Node-RED version: v4.0.2
16 Sep 18:54:33 - [info] Node.js version: v20.17.0
16 Sep 18:54:33 - [info] Linux 6.6.31+rpt-rpi-v8 arm64 LE (Bookworm)
But it works on all 3 settings, aka IPv4, IPv6 and any which supprised me.
I see in your code that on 'any' that you set agentOptions.family = this.
addressFamily and this.addressFamily is now a string "4", "6" or "" rather
than undefined when SOCKS is not enabled in v 16.0.2?
I then updated my live system a Raspi 3B (no +) with IPv6 enabled to NR
4.0.2 and Node 20.17.0 and 16.1.0 of your node, restarted NR (still on
Bullseye) and the problem reappeared. I edited the bot to IPv4 and problem
remained so I did a full reboot on the RasPi and the fault disappears.
Now that Pi also works OK with any setting of agentOptions.family (4, 6 or
any)
So all now good, I am working with NR 4.0.2, node 20 and bookworm
I also tested my modified version of your .js file on node 22 and saw same
behaviour as node 20 so not expecting probles when we go to node 22. But I
will stick with Node 20 for the present time as Node 22 is still throwing a
few depreciation faults etc. I guess they will be sorted before NR
officially supports Node 22 when it goes to LTS.
Ian aka Wombat Hollow,
fyi Wombat Hollow is our property name and my NR implemtation is all about
automation of our power, water, heating etc here as we are fully off -grid
except for Starlink for data, and a driveway to the local road for physical
access)
…On Mon, 16 Sept 2024 at 02:15, Karl-Heinz Wind ***@***.***> wrote:
Please try version 16.1.0 and let me know if it changed something
—
Reply to this email directly, view it on GitHub
<#343 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDP7BS47DHBT533EQPYHHTZWWXBHAVCNFSM6AAAAAA6LYC7RSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJRGY3DANRUGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Ian (@WombatHollow), Ok I am glad that it works now. On the other hand I do not understand why it works regardless of what you choose in the configuration. Can we try to eliminate that? I would like to fully understand the problem and the solution. |
@WombatHollow can you try to use a socks proxy. I am curious if that works, too? |
Karl, I did a bit more work and have discovered my 16.2.0 'worked' for
IPv4, IPv6 and any.
The answer is when you deploy, then those new settings do get placed into
options....family and applied to newTelegramBot but polling continues with
the old settings! aka no change.
If I stop and start NR then the new settings are applied and as expected
IPv4 works without error whilst IPv6 or any do not work.
So only the following worked
{
polling: { autoStart: true, interval: 300, params: { timeout: 10 } },
baseApiUrl: '',
testEnvironment: false,
request: { agentOptions: { family: 4 } }
}
it must have .family = 4
A minor error, for 'any', .family = 0 for it to be effective. .family
requires a number 0, 4 or 6
As for SOCKs, I have never used proxies or SOCKs so that will require a bit
more research from me
…On Tue, 17 Sept 2024 at 05:41, Karl-Heinz Wind ***@***.***> wrote:
@WombatHollow <https://github.com/WombatHollow> can you try to use a
socks proxy. I am curious if that works, too?
—
Reply to this email directly, view it on GitHub
<#343 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDP7BSHF4YJU7W5X6Z4TQLZW4X5TAVCNFSM6AAAAAA6LYC7RSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJTG43DOOBYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I've been seeing some frequent |
@gtalusan , if what you are seeing is this problem, a work around is to either disable IPv6 on your nodered host machine, or in the bot Node set 'IP address Family' to IPv4 and then restart the machine. The issue is in some NODEjs libraries that this Node uses, it doesn't properly test if IPv6 works before using. It just sees IPv6 is enabled on host machine but if IPv6 is not enabled in network firewall/router then the code fails. |
Ok thanks. I switched the bot node to IPV4 and restarted the Docker container. Will monitor. |
NR 3.1.0
Node 20.8.1
Raspberry Pi 3B, running Bullseye (just performed full update)
Linux version 6.1.21-v7+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1642 SMP Mon Apr 3 17:20:52 BST 2023
After performing update, the Node throughs the following error in the Log
Disable all Nodes except BOT and Errors stop being reported in the debug screen
Enabled Control Node , still no error
Enable a Recieve or Send node and errors return
Eventually Node-red appears to stop and restart.
Only recovery is to node-red-stop then Node-red --safe and disable BOT and related Nodes
Example Log
The text was updated successfully, but these errors were encountered: