Version v3.0.2 seems not compatible with @particle/node-red-contrib-particle-official 0.1.7

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 suspect you need to raise this with the author of the node.

Just as a sanity check - what version of NODEJS is the v2.2.2 running on & what version of NODEJS is v3.0.2 running on?

Both node.js v16

I installed in Raspberry Pi (Node v18.7.0) and exactly same problem :frowning:

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'.

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