iobroker-community-adapters / ioBroker.nuki-extended

Nuki Smart Lock - Keyless electronic door lock for smart access with your ioBroker
MIT License
29 stars 15 forks source link

nodejs 20: Error retrieving notifications/smartlocks #281

Closed Grothesk242 closed 1 year ago

Grothesk242 commented 1 year ago

Starting with nodejs20, the adapter does not start up, nodejs<20 works just fine:

2023-04-21 18:46:21.428  - info: nuki-extended.0 (1086360) starting. Version 2.6.5 in /opt/iobroker/node_modules/iobroker.nuki-extended, node: v20.0.0, js-controller: 5.0.1-alpha.0-20230418-efa3e809
2023-04-21 18:46:21.561  - info: nuki-extended.0 (1086360) Polling Nuki Web API with a frequency of 20s.
2023-04-21 18:46:21.898  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving notifications: Did not receive notifications!
2023-04-21 18:46:21.900  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving smartlocks: Did not receive a list of smartlocks!
2023-04-21 18:46:22.016  - debug: nuki-extended.0 (1086360) getBridgeApi() [forcePlainToken: true]: [{"deviceType":2,"nukiId":DELETED,"name":"Treppenhaus","firmwareVersion":"1.10.1","lastKnownState":{"mode":2,"state":1,"stateName":"online","batteryCritical":false,"ringactionTimestamp":"2023-04-21T15:47:43+00:00","ringactionState":false,"timestamp":"2023-04-21T15:47:44+00:00"},"nuki":{"_events":{},"_eventsCount":0,"_maxListeners":100,"connection":{"ip":"192.168.178.33","port":8080,"token":"DELETED","type":1,"forcePlainToken":true,"delayBetweenRequests":250,"delayer":{"isFulfilled":false,"isRejected":false}},"nukiId":DELETED,"deviceType":2}},{"deviceType":0,"nukiId":DELETED,"name":"Wohnung","firmwareVersion":"2.14.5","lastKnownState":{"mode":2,"state":3,"stateName":"unlocked","batteryCritical":false,"batteryCharging":false,"batteryChargeState":80,"doorsensorState":2,"doorsensorStateName":"door closed","timestamp":"2023-04-21T15:50:15+00:00"},"nuki":{"_events":{},"_eventsCount":0,"_maxListeners":100,"connection":{"ip":"192.168.178.33","port":8080,"token":"DELETED","type":1,"forcePlainToken":true,"delayBetweenRequests":250,"delayer":{"isFulfilled":false,"isRejected":false}},"nukiId":DELETED,"deviceType":0}}]
2023-04-21 18:46:22.022  - debug: nuki-extended.0 (1086360) Updating device openers.treppenhaus with payload: {"deviceType":2,"nukiId":DELETED,"name":"Treppenhaus","firmwareVersion":"1.10.1","bridge":"DELETED","state":{"mode":2,"state":1,"batteryCritical":false,"ringactionTimestamp":"2023-04-21T15:47:43+00:00","ringactionState":false,"timestamp":"2023-04-21T15:47:44+00:00"},"nukiHexId":"DELETED"}
2023-04-21 18:46:22.030  - debug: nuki-extended.0 (1086360) Updating device smartlocks.wohnung with payload: {"deviceType":0,"nukiId":DELETED,"name":"Wohnung","firmwareVersion":"2.14.5","bridge":"DELETED","state":{"mode":2,"state":3,"batteryCritical":false,"batteryCharging":false,"batteryChargeState":80,"doorsensorState":2,"doorsensorStateName":"door closed","timestamp":"2023-04-21T15:50:15+00:00","locked":3},"nukiHexId":"DELETED"}
2023-04-21 18:46:22.704  - debug: nuki-extended.0 (1086360) Retrieved current callbacks from Nuki Bridge with name nuki-bridge.
2023-04-21 18:46:22.708  - debug: nuki-extended.0 (1086360) Callback (with URL http://192.168.178.48:51989/nuki-api-bridge) already attached to Nuki Bridge with name nuki-bridge.
2023-04-21 18:46:22.734  - info: nuki-extended.0 (1086360) Listening for Nuki events on port 51989.
2023-04-21 18:46:41.670  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving smartlocks: Did not receive a list of smartlocks!
2023-04-21 18:46:41.935  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving notifications: Did not receive notifications!
2023-04-21 18:47:01.667  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving smartlocks: Did not receive a list of smartlocks!
2023-04-21 18:47:01.925  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving notifications: Did not receive notifications!
2023-04-21 18:47:21.665  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving smartlocks: Did not receive a list of smartlocks!
2023-04-21 18:47:21.933  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving notifications: Did not receive notifications!
2023-04-21 18:47:41.710  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving smartlocks: Did not receive a list of smartlocks!
2023-04-21 18:47:41.943  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving notifications: Did not receive notifications!
2023-04-21 18:48:01.698  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving smartlocks: Did not receive a list of smartlocks!
2023-04-21 18:48:01.924  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving notifications: Did not receive notifications!
2023-04-21 18:48:21.669  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving smartlocks: Did not receive a list of smartlocks!
2023-04-21 18:48:21.917  - warn: nuki-extended.0 (1086360) getWebApi(): Error retrieving notifications: Did not receive notifications!
Grothesk242 commented 1 year ago

Just tested nodejs 20.4.0 The issue still persists.

mcm1957 commented 1 year ago

Just tested nodejs 20.4.0 The issue still persists.

As this issue is still open and no hint at releasenotes indicates that it has been solve, this is not surprising.

winnyschuster commented 1 year ago

@Grothesk242 Kannst du mal Sentry in der Instanz ausschalten und testen ob das hilft?

Grothesk242 commented 1 year ago

Disabling Sentry makes the adapter start without the errors. Need to check more detailed if it is fully working.

winnyschuster commented 1 year ago

please check again with node 20.6.0 and sentry enabled

Grothesk242 commented 1 year ago

Working with nodejs 20.6.0 Closing issue.