Restart Loop detected: Type-Error while updating Current Hour
Closed this issue · 1 comments
Since Update to Version 0.9.9 an Error occurs while updating current hour.
2021-10-17 21:00:01.047 - error: swiss-weather-api.0 (17305) uncaught exception: Cannot read property 'val' of null 2021-10-17 21:00:01.055 - error: swiss-weather-api.0 (17305) TypeError: Cannot read property 'val' of null at Immediate. (/opt/iobroker/node_modules/iobroker.swiss-weather-api/main.js:797:26) at processImmediate (internal/timers.js:458:21) 2021-10-17 21:00:01.056 - error: swiss-weather-api.0 (17305) Cannot read property 'val' of null
So line
ioBroker.swiss-weather-api/main.js
Line 797 in c6c2d16
It seems that the check on
ioBroker.swiss-weather-api/main.js
Line 781 in c6c2d16
=> I should also check state for null, not only state.val
Full Log (debug log is in work):
`
2021-10-17 20:45:10.021 - info: swiss-weather-api.0 (17305) Getting forecast for GeolocationId: 47.0454,7.3723
2021-10-17 20:45:30.032 - info: swiss-weather-api.0 (17305) update current hour...
2021-10-17 21:00:00.983 - info: swiss-weather-api.0 (17305) update current hour...
2021-10-17 21:00:01.047 - error: swiss-weather-api.0 (17305) uncaught exception: Cannot read property 'val' of null
2021-10-17 21:00:01.055 - error: swiss-weather-api.0 (17305) TypeError: Cannot read property 'val' of null
at Immediate. (/opt/iobroker/node_modules/iobroker.swiss-weather-api/main.js:797:26)
at processImmediate (internal/timers.js:458:21)
2021-10-17 21:00:01.056 - error: swiss-weather-api.0 (17305) Cannot read property 'val' of null
2021-10-17 21:00:01.065 - info: swiss-weather-api.0 (17305) cleaned everything up...
2021-10-17 21:00:01.066 - info: swiss-weather-api.0 (17305) terminating
2021-10-17 21:00:01.068 - warn: swiss-weather-api.0 (17305) Terminated (UNCAUGHT_EXCEPTION): Without reason
2021-10-17 21:00:01.784 - warn: javascript.0 (1569) Read-only state "swiss-weather-api.0.info.connection" has been written without ack-flag with value "false"
2021-10-17 21:00:01.937 - error: host.ioBroker-RasPi instance system.adapter.swiss-weather-api.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2021-10-17 21:00:01.945 - info: host.ioBroker-RasPi Restart adapter system.adapter.swiss-weather-api.0 because enabled
2021-10-17 21:00:32.014 - info: host.ioBroker-RasPi instance system.adapter.swiss-weather-api.0 started with pid 19477
2021-10-17 21:00:35.688 - info: swiss-weather-api.0 (19477) starting. Version 0.9.9 in /opt/iobroker/node_modules/iobroker.swiss-weather-api, node: v12.18.2, js-controller: 3.3.15
2021-10-17 21:00:35.777 - info: swiss-weather-api.0 (19477) longitude/longitude not set, get data from system
2021-10-17 21:00:35.830 - info: swiss-weather-api.0 (19477) system longitude: 7.375587970018386 latitude: 47.04616448019215
2021-10-17 21:00:46.450 - info: swiss-weather-api.0 (19477) Getting forecast for GeolocationId: 47.0454,7.3723
2021-10-17 21:01:06.472 - info: swiss-weather-api.0 (19477) update current hour...
2021-10-17 21:01:06.505 - error: swiss-weather-api.0 (19477) uncaught exception: Cannot read property 'val' of null
2021-10-17 21:01:06.510 - error: swiss-weather-api.0 (19477) TypeError: Cannot read property 'val' of null
at Immediate. (/opt/iobroker/node_modules/iobroker.swiss-weather-api/main.js:797:26)
at processImmediate (internal/timers.js:458:21)
2021-10-17 21:01:06.512 - error: swiss-weather-api.0 (19477) Cannot read property 'val' of null
2021-10-17 21:01:06.521 - info: swiss-weather-api.0 (19477) cleaned everything up...
2021-10-17 21:01:06.523 - info: swiss-weather-api.0 (19477) terminating
2021-10-17 21:01:06.546 - warn: swiss-weather-api.0 (19477) Terminated (UNCAUGHT_EXCEPTION): Without reason
2021-10-17 21:01:07.170 - warn: javascript.0 (1569) Read-only state "swiss-weather-api.0.info.connection" has been written without ack-flag with value "false"
2021-10-17 21:01:07.211 - error: host.ioBroker-RasPi Caught by controller[0]: (node:19477) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
2021-10-17 21:01:07.212 - error: host.ioBroker-RasPi instance system.adapter.swiss-weather-api.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2021-10-17 21:01:07.214 - info: host.ioBroker-RasPi Restart adapter system.adapter.swiss-weather-api.0 because enabled
2021-10-17 21:01:37.266 - info: host.ioBroker-RasPi instance system.adapter.swiss-weather-api.0 started with pid 20888
2021-10-17 21:01:40.056 - info: swiss-weather-api.0 (20888) starting. Version 0.9.9 in /opt/iobroker/node_modules/iobroker.swiss-weather-api, node: v12.18.2, js-controller: 3.3.15
2021-10-17 21:01:40.130 - info: swiss-weather-api.0 (20888) longitude/longitude not set, get data from system
2021-10-17 21:01:40.171 - info: swiss-weather-api.0 (20888) system longitude: 7.375587970018386 latitude: 47.04616448019215
2021-10-17 21:01:50.798 - info: swiss-weather-api.0 (20888) Getting forecast for GeolocationId: 47.0454,7.3723
2021-10-17 21:02:10.808 - info: swiss-weather-api.0 (20888) update current hour...
2021-10-17 21:02:10.840 - error: swiss-weather-api.0 (20888) uncaught exception: Cannot read property 'val' of null
2021-10-17 21:02:10.845 - error: swiss-weather-api.0 (20888) TypeError: Cannot read property 'val' of null
at Immediate. (/opt/iobroker/node_modules/iobroker.swiss-weather-api/main.js:797:26)
at processImmediate (internal/timers.js:458:21)
2021-10-17 21:02:10.847 - error: swiss-weather-api.0 (20888) Cannot read property 'val' of null
2021-10-17 21:02:10.854 - info: swiss-weather-api.0 (20888) cleaned everything up...
2021-10-17 21:02:10.855 - info: swiss-weather-api.0 (20888) terminating
2021-10-17 21:02:10.857 - warn: swiss-weather-api.0 (20888) Terminated (UNCAUGHT_EXCEPTION): Without reason
2021-10-17 21:02:11.508 - warn: javascript.0 (1569) Read-only state "swiss-weather-api.0.info.connection" has been written without ack-flag with value "false"
2021-10-17 21:02:11.556 - error: host.ioBroker-RasPi Caught by controller[0]: (node:20888) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
2021-10-17 21:02:11.559 - error: host.ioBroker-RasPi instance system.adapter.swiss-weather-api.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2021-10-17 21:02:11.563 - info: host.ioBroker-RasPi Restart adapter system.adapter.swiss-weather-api.0 because enabled
2021-10-17 21:02:11.574 - warn: host.ioBroker-RasPi Do not restart adapter system.adapter.swiss-weather-api.0 because restart loop detected
`
Solved with V 1.0.0