Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing when attempting to sync with Glooko #23

Open
devonestes opened this issue Aug 26, 2023 · 1 comment
Open

Crashing when attempting to sync with Glooko #23

devonestes opened this issue Aug 26, 2023 · 1 comment

Comments

@devonestes
Copy link

Hey y'all,

So I've got this basically set up it seems, but there is an error when trying to sync with Glooko. It's authenticating correctly from the logs I've seen, but then I see this error which leads to a crash:

2023-08-26T09:35:04Z app[1781975b54e178] fra [info]/opt/app/node_modules/nightscout-connect/lib/sources/glooko/index.js:85
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]      var last_mills = Math.max(two_days_ago, last_known.entries ? last_known.entries.getTime( ) : two_days_ago);
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]                                                         ^
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]TypeError: Cannot read properties of null (reading 'entries')
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at Object.dataFromSesssion (/opt/app/node_modules/nightscout-connect/lib/sources/glooko/index.js:85:58)
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at dataFetchService (/opt/app/node_modules/nightscout-connect/lib/machines/fetch.js:8:19)
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at Interpreter._exec (/opt/app/node_modules/xstate/lib/interpreter.js:269:63)
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at Interpreter.exec (/opt/app/node_modules/xstate/lib/interpreter.js:1026:10)
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at Interpreter.execute (/opt/app/node_modules/xstate/lib/interpreter.js:387:14)
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at Interpreter.update (/opt/app/node_modules/xstate/lib/interpreter.js:415:12)
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at /opt/app/node_modules/xstate/lib/interpreter.js:110:15
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at Scheduler.process (/opt/app/node_modules/xstate/lib/scheduler.js:69:7)
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at Scheduler.schedule (/opt/app/node_modules/xstate/lib/scheduler.js:48:10)
2023-08-26T09:35:04Z app[1781975b54e178] fra [info]    at Interpreter.send (/opt/app/node_modules/xstate/lib/interpreter.js:104:23)

Looks like somehow last_known is being passed in as null? Any idea why this might happen or how I can resolve it? Maybe we just need to have an explicit if last_entries === null in there to handle this?

@Kaiz3n-M
Copy link

Kaiz3n-M commented Feb 13, 2024

Having the same issue, any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants