Chris-656 / ioBroker.fitbit-fitness

Retrieves Fitbit data
https://forum.iobroker.net/topic/52852/fitbit-adapter-new
MIT License
3 stars 5 forks source link

Issue with js-controller 5.x Alpha #10

Closed Ilovegym66 closed 10 months ago

Ilovegym66 commented 1 year ago

with actual js-controller 5.x Alpha this issue appears, the adapter crashed:

2023-04-06 10:52:54.815 - info: host.iobrokerS2 instance system.adapter.fitbit-fitness.0 started with pid 13160 2023-04-06 10:52:54.815 - info: host.iobrokerS2 instance system.adapter.fitbit-fitness.0 started with pid 13160 2023-04-06 10:52:55.535 - debug: fitbit-fitness.0 (13160) Redis Objects: Use Redis connection: 10.1.1.1:6379 2023-04-06 10:52:55.555 - debug: fitbit-fitness.0 (13160) Objects client ready ... initialize now 2023-04-06 10:52:55.556 - debug: fitbit-fitness.0 (13160) Objects create System PubSub Client 2023-04-06 10:52:55.557 - debug: fitbit-fitness.0 (13160) Objects create User PubSub Client 2023-04-06 10:52:56.062 - debug: fitbit-fitness.0 (13160) Objects client initialize lua scripts 2023-04-06 10:52:56.066 - debug: fitbit-fitness.0 (13160) Objects connected to redis: 10.1.1.1:6379 2023-04-06 10:52:56.089 - debug: fitbit-fitness.0 (13160) Redis States: Use Redis connection: 10.1.1.1:6379 2023-04-06 10:52:56.096 - debug: fitbit-fitness.0 (13160) States create System PubSub Client 2023-04-06 10:52:56.097 - debug: fitbit-fitness.0 (13160) States create User PubSub Client 2023-04-06 10:52:56.103 - debug: fitbit-fitness.0 (13160) States connected to redis: 10.1.1.1:6379 2023-04-06 10:52:55.535 - debug: fitbit-fitness.0 (13160) Redis Objects: Use Redis connection: 10.1.1.1:6379 2023-04-06 10:52:55.555 - debug: fitbit-fitness.0 (13160) Objects client ready ... initialize now 2023-04-06 10:52:55.556 - debug: fitbit-fitness.0 (13160) Objects create System PubSub Client 2023-04-06 10:52:55.557 - debug: fitbit-fitness.0 (13160) Objects create User PubSub Client 2023-04-06 10:52:56.062 - debug: fitbit-fitness.0 (13160) Objects client initialize lua scripts 2023-04-06 10:52:56.066 - debug: fitbit-fitness.0 (13160) Objects connected to redis: 10.1.1.1:6379 2023-04-06 10:52:56.089 - debug: fitbit-fitness.0 (13160) Redis States: Use Redis connection: 10.1.1.1:6379 2023-04-06 10:52:56.096 - debug: fitbit-fitness.0 (13160) States create System PubSub Client 2023-04-06 10:52:56.097 - debug: fitbit-fitness.0 (13160) States create User PubSub Client 2023-04-06 10:52:56.103 - debug: fitbit-fitness.0 (13160) States connected to redis: 10.1.1.1:6379 2023-04-06 10:52:58.489 - info: fitbit-fitness.0 (13160) starting. Version 0.4.10 (non-npm: Chris-656/ioBroker.fitbit-fitness) in /opt/iobroker/node_modules/iobroker.fitbit-fitness, node: v18.15.0, js-controller: 5.0.1-alpha.0-20230406-4552d569 2023-04-06 10:52:58.550 - debug: fitbit-fitness.0 (13160) Getting refresh Token: c817bd62dd39ec8ed529fc0d16396a1xxxxxxxx 2023-04-06 10:52:58.803 - info: fitbit-fitness.0 (13160) User logged in B...l id:xxxx8 2023-04-06 10:52:58.808 - debug: fitbit-fitness.0 (13160) Tokens checked 2023-04-06 10:52:59.041 - info: fitbit-fitness.0 (13160) Activity Records: Steps:0 Floors:undefined Calories:1884 2023-04-06 10:52:59.047 - error: fitbit-fitness.0 (13160) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). 2023-04-06 10:52:59.047 - error: fitbit-fitness.0 (13160) unhandled promise rejection: undefined is not a valid state value 2023-04-06 10:52:59.049 - error: fitbit-fitness.0 (13160) Error: undefined is not a valid state value at Object.maybeCallbackWithError (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/maybeCallback.js:35:17) at FitBit._setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5332:49) at FitBit.setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5293:21) at FitBit.setActivityStates (/opt/iobroker/node_modules/iobroker.fitbit-fitness/main.js:321:9) at FitBit.getActivityRecords (/opt/iobroker/node_modules/iobroker.fitbit-fitness/main.js:305:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async FitBit.getFitbitRecords (/opt/iobroker/node_modules/iobroker.fitbit-fitness/main.js:87:5) 2023-04-06 10:52:59.049 - error: fitbit-fitness.0 (13160) undefined is not a valid state value 2023-04-06 10:52:59.057 - info: fitbit-fitness.0 (13160) terminating 2023-04-06 10:52:59.058 - warn: fitbit-fitness.0 (13160) Terminated (UNCAUGHT_EXCEPTION): Without reason 2023-04-06 10:52:59.277 - info: fitbit-fitness.0 (13160) Body records: Weight:10.5 Fat:11.342750549316406 BMI:20.1 2023-04-06 10:52:59.559 - info: fitbit-fitness.0 (13160) terminating 2023-04-06 10:52:59.612 - error: host.iobrokerS2 instance system.adapter.fitbit-fitness.0 terminated with code 6 (UNCAUGHT_EXCEPTION)

mcm1957 commented 1 year ago

Gemäß Rückmeldung läuft der Adapter auch mit js-controller 5 https://forum.iobroker.net/topic/68290/js-controller-5-0-x-jetzt-f%C3%BCr-alle-user-im-stable/86