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

LibreLinkUp crashes when last_known is null #27

Open
ACWalker opened this issue Oct 23, 2023 · 1 comment · May be fixed by #34
Open

LibreLinkUp crashes when last_known is null #27

ACWalker opened this issue Oct 23, 2023 · 1 comment · May be fixed by #34

Comments

@ACWalker
Copy link

ACWalker commented Oct 23, 2023

I have the following error when using the nightscout-connect plugin 0.0.12 on nightscout version 15.0.1:

 /opt/app/node_modules/nightscout-connect/lib/sources/librelinkup.js:124
       var last_updated = last_known.entries;
                                     ^

 TypeError: Cannot read properties of null (reading 'entries')
     at Object.transformGlucose [as transformer] (/opt/app/node_modules/nightscout-connect/lib/sources/librelinkup.js:124:37)
     at transformService (/opt/app/node_modules/nightscout-connect/lib/machines/fetch.js:14:37)
     at Interpreter._exec (/opt/app/node_modules/xstate/lib/interpreter.js:269:63)
     at Interpreter.exec (/opt/app/node_modules/xstate/lib/interpreter.js:1026:10)
     at Interpreter.execute (/opt/app/node_modules/xstate/lib/interpreter.js:387:14)
     at Interpreter.update (/opt/app/node_modules/xstate/lib/interpreter.js:415:12)
     at /opt/app/node_modules/xstate/lib/interpreter.js:110:15
     at Scheduler.process (/opt/app/node_modules/xstate/lib/scheduler.js:69:7)
     at Scheduler.schedule (/opt/app/node_modules/xstate/lib/scheduler.js:48:10)
     at Interpreter.send (/opt/app/node_modules/xstate/lib/interpreter.js:104:23)

It seems the variable last_known is no longer used so the line lib/sources/librelinkup.js:124 can probably be removed.

I tried contributing myself but I don't have permissions to open a PR :(.

@billyjbryant billyjbryant linked a pull request Jan 11, 2024 that will close this issue
@billyjbryant
Copy link

I submitted PR #34 that fixes this issue. I tested this by installing nightscout-connect from my git repo in cgm-remote-monitor then building a container locally.

When deployed in place of my existing Nightscout stack, this fixes the issue with Libre Link up data not populating and the server crashing.

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

Successfully merging a pull request may close this issue.

2 participants