zigbee-shepherd icon indicating copy to clipboard operation
zigbee-shepherd copied to clipboard

Crash on message recieved before ready

Open remijn opened this issue 8 years ago • 0 comments

When a message is received before the coordinator is ready, shepherd crashes with this error

zigbee-shepherd:request RSP <-- SYS:osalNvRead, status: 0 +163ms zigbee-shepherd:request REQ --> SAPI:readConfiguration +12ms zigbee-shepherd:request RSP <-- SAPI:readConfiguration, status: 0 +23ms /Users/nick/Programming/zigbee-shepherd/lib/components/af.js:530 targetEp = af.controller.getCoord().getEndpoint(msg.dstendpoint); // => find local ep ^

TypeError: Cannot read property 'getEndpoint' of null at dispatchIncomingMsg (/Users/nick/Programming/zigbee-shepherd/lib/components/af.js:530:44) at Controller.incomingMsgHandler (/Users/nick/Programming/zigbee-shepherd/lib/components/af.js:663:12) at emitOne (events.js:77:13) at Controller.emit (events.js:169:7) at Object.bridge._areqEventBridge (/Users/nick/Programming/zigbee-shepherd/lib/components/event_bridge.js:15:16) at CcZnp. (/Users/nick/Programming/zigbee-shepherd/lib/components/controller.js:98:16) at emitOne (events.js:77:13) at CcZnp.emit (events.js:169:7) at CcZnp._mtIncomingDataHdlr (/Users/nick/Programming/zigbee-shepherd/node_modules/cc-znp/lib/ccznp.js:367:14) at /Users/nick/Programming/zigbee-shepherd/node_modules/cc-znp/lib/ccznp.js:333:22 at nextTickCallbackWith0Args (node.js:489:9) at process._tickCallback (node.js:418:13)

remijn avatar May 01 '17 14:05 remijn