UNCAUGHT_EXCEPTION when adapter starts
tetzlav opened this issue · 4 comments
tetzlav commented
Describe the bug
when i start the adapter i get
sureflap.0 | 2022-03-14 14:29:21.756 | warn | Terminated (UNCAUGHT_EXCEPTION): Without reason
sureflap.0 | 2022-03-14 14:29:21.756 | info | terminating
sureflap.0 | 2022-03-14 14:29:21.756 | info | everything cleaned up
sureflap.0 | 2022-03-14 14:29:21.755 | error | Cannot read property 'length' of undefined
sureflap.0 | 2022-03-14 14:29:21.754 | error | TypeError: Cannot read property 'length' of undefined at Immediate.<anonymous> (/opt/iobroker/node_modules/iobroker.sureflap/main.js:1784:66) at processImmediate (internal/timers.js:466:21)
sureflap.0 | 2022-03-14 14:29:21.754 | error | uncaught exception: Cannot read property 'length' of undefined
sureflap.0 | 2022-03-14 14:29:20.581 | info | update loop started
sureflap.0 | 2022-03-14 14:29:20.580 | info | starting update loop...
sureflap.0 | 2022-03-14 14:29:20.579 | info | connected
sureflap.0 | 2022-03-14 14:29:20.050 | debug | login count: 1
sureflap.0 | 2022-03-14 14:29:20.050 | debug | json: {"email_address":"****","password":"****","device_id":"****"}
sureflap.0 | 2022-03-14 14:29:20.050 | debug | password: ****
sureflap.0 | 2022-03-14 14:29:20.050 | debug | email_address: ****
sureflap.0 | 2022-03-14 14:29:20.050 | info | connecting...
sureflap.0 | 2022-03-14 14:29:20.049 | debug | starting SureFlap Adapter v1.1.2
sureflap.0 | 2022-03-14 14:29:20.040 | info | starting. Version 1.1.2 in /opt/iobroker/node_modules/iobroker.sureflap, node: v14.19.0, js-controller: 3.3.22
Versions:
- Adapter version: 1.1.2
- JS-Controller version: 3.3.22
- Node version: v14.19.0
- Operating system: Debian 9.13
Additional context
Hub + SureFlap works with PetCare App
Sickboy78 commented
Hi @tetzlav ,
thx for reporting this bug!
Could it be, that you haven't assigned any pets to your flap yet?
In this case, I hope I have fixed it - with my last commit I added checks, if there are no pets assigned.
Please try to install the latest source from github and see if this fixes your problem.
Best Regards
tetzlav commented
yes, you are right, i already added our two cats to the flap, but after installing the hub all the pets are lost...
tetzlav commented
You can close the issue. After adding my cats the Error is gone. Thank you a lot!