Skip to content

Cannot destructure property 'onEvent' of 'undefined' as it is undefined. #3

@TheCranston

Description

@TheCranston

I've had the particle integration via node-red working for quite a while now and at some point a guess a version change happened and now every so many hours I get this cycle of "Reauthenticating" then "exception" and finally node red restarts.

Not quite sure what's happening. Below is the log of one of these events.

Reauthenticating...
Reauthenticating...
Reauthenticating...
Reauthenticating...
Authenticated with Particle
13 Jan 10:49:13 - [red] Uncaught Exception:
13 Jan 10:49:13 - [error] TypeError: Cannot destructure property 'onEvent' of 'undefined' as it is undefined.
    at Api.listenToEventStream (/config/node-red/node_modules/@particle/node-red-contrib-particle-official/src/api.js:53:24)
    at login.then.retryIn (/config/node-red/node_modules/@particle/node-red-contrib-particle-official/src/api.js:169:29)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[10:49:13] INFO: Starting Node-RED...
Welcome to Node-RED
===================
13 Jan 10:49:18 - [info] Node-RED version: v2.1.5
13 Jan 10:49:18 - [info] Node.js  version: v16.13.2
13 Jan 10:49:18 - [info] Linux 5.10.63-v8 arm64 LE
13 Jan 10:49:19 - [info] Loading palette nodes
13 Jan 10:49:26 - [info] Dashboard version 3.1.3 started at /endpoint/ui
13 Jan 10:49:27 - [info] Settings file  : /etc/node-red/config.js
13 Jan 10:49:27 - [info] Context store  : 'default' [module=memory]
13 Jan 10:49:27 - [info] User directory : /config/node-red/
13 Jan 10:49:27 - [warn] Projects disabled : editorTheme.projects.enabled=false
13 Jan 10:49:27 - [info] Flows file     : /config/node-red/flows.json
13 Jan 10:49:27 - [info] Server now running at http://127.0.0.1:46836/
13 Jan 10:49:27 - [info] Starting flows
13 Jan 10:49:27 - [info] Started flows
13 Jan 10:49:27 - [info] [server:Home Assistant] Connecting to http://x.x.x.x:8123
13 Jan 10:49:27 - [info] [server:Home Assistant] Connected to http://x.x.x.x:8123
Authenticated with Particle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions