glennsp / com.mill

Support for Mill WiFi heaters
GNU General Public License v3.0
5 stars 20 forks source link

NRE in registerRunListener #2

Closed pardeike closed 5 years ago

pardeike commented 5 years ago

After the automatic update to 1.0.2, I get the following crash:

TypeError: Cannot read property 'heatStatus' of null
at isHeatingCondition.register.registerRunListener (/drivers/mill/device.js:30:45)
at FlowCardCondition._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/FlowCard.js:1:1246)
at emitThree (events.js:136:13)
at FlowCardCondition.emit (events.js:217:7)
at ManagerFlow._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/manager/flow.js:1:2274)
at _eventListeners.filter.forEach.t (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1219)
at Array.forEach (<anonymous>)
at HomeyClient._onMessage (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1196)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emit (internal/child_process.js:762:12)
at _combinedTickCallback (internal/process/next_tick.js:142:11)
at process._tickCallback (internal/process/next_tick.js:181:9)

Exit code: 1
Exit signal: null
pardeike commented 5 years ago

I rebooted my Homey but it did not help. Then I stopped and restarted the plugin and still the same error. Finally, I removed it completely and added it again. After logging in, it just works for now.

pardeike commented 5 years ago

Update: when my Homey reboots (in this case power failure), I still get the above error. The temporary workaround is to delete the app and install it and log in again. Of course that removes the device in all my flows which is a pain.

If I have time, I will try to analyse the problem and maybe add an automatic reset of the login information as that is what I suspect the reinstall does but without loosing the device in my flows.

pardeike commented 5 years ago

Update: i just updated 2.0.0 to rc7 and the Mill app kept its authentication status like a champ. So it seems more stable than before and I don’t need to reinstall it anymore. I will reopen this if I can reproduce the issue.