With version v3.0.2 my NR docker server (node.js v16) stop every 7776 seconds (about 129 minutes), the time for reauthentication.
I was able to solve it in two ways: reverting NR to v2.2.2 or changing the res.body.expires_in time (what I get is to reduce the problem).
I also tried another node from other author "node-red-contrib-particle", without success (similar problem?). Probably changed authentication particle's answer and newer versions are more unstable to the change.
This is the error
Reauthenticating...
Authenticated with Particle
[red] Uncaught Exception:
[error] TypeError: Cannot destructure property 'onEvent' of 'undefined' as it is undefined.
at Api.listenToEventStream (/data/node_modules/@particle/node-red-contrib-particle-official/src/api.js:53:24)
at login.then.retryIn (/data/node_modules/@particle/node-red-contrib-particle-official/src/api.js:169:29)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I installed in Raspberry Pi (Node v18.7.0) and exactly same problem
Reauthenticating...
Authenticated with Particle
20 Aug 15:21:23 - [red] Uncaught Exception:
20 Aug 15:21:23 - [error] TypeError: Cannot destructure property 'onEvent' of 'undefined' as it is undefined.
at Api.listenToEventStream (/home/fran/.node-red/node_modules/@particle/node-red-contrib-particle-official/src/api.js:53:24)
at login.then.retryIn (/home/fran/.node-red/node_modules/@particle/node-red-contrib-particle-official/src/api.js:169:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.