Closed dassystem closed 2 years ago
hi @dassystem, can you make sure you have current measurements in the LibreLink Up app? i have not come across this issue myself yet. :(
Whether the application has fresh data from a client or not, the server should not crash. Not having data could have several reasons: A fresh setup, missing internet connection of the uploader, issues on the side of Abbots official servers… In these cases, certainly not the whole application should break.
Unfortunately I don't know javascript very well, but I assume that we need to check for null values when loading it to the variable in index.js line 186.
const measurementDate = getUtcDateFromString(glucoseMeasurement.FactoryTimestamp);
An additional try catch might solve it. Happy to test it.
@dassystem is this still an issue with the latest version? I added a few improvements to the error handling.
Hey @timoschlueter, thanks for the mention!
I'm now getting a error message in the log (which is correct!) and the application is not crashing anymore (which is even better!)
nightscout-libre-link | 2022-06-14T13:11:48.104457492Z > nightscout-librelink-up@1.7.2 start
nightscout-libre-link | 2022-06-14T13:11:48.104477066Z > node index.js
nightscout-libre-link | 2022-06-14T13:20:00.425171582Z [info]: no authTicket.expires
nightscout-libre-link | 2022-06-14T13:20:00.425530543Z [info]: renew token
nightscout-libre-link | 2022-06-14T13:20:00.760973318Z [info]: Logged in to LibreLink Up
nightscout-libre-link | 2022-06-14T13:20:00.954207820Z [info]: Found 1 LibreLink Up connection.
nightscout-libre-link | 2022-06-14T13:20:00.955213701Z [info]: -> The following connection will be used: <MY-NAME> (Patient-ID: <MY-UUID>)
nightscout-libre-link | 2022-06-14T13:20:01.130118050Z [info]: Received blood glucose measurement items
nightscout-libre-link | 2022-06-14T13:20:01.132070664Z [error]: Error getting glucose measurements Cannot read properties of null (reading 'FactoryTimestamp')
So at least this unhappy-path is working as expected and this bug issue can be closed. Thank you!
awesome! :)
Hi, I have the following issue, right after starting the docker-container. It seems to be connected to nightscout and the librelink cloud correctly.
The error might occure because I have no recent blood glucose values in the libre cloud. (But I plan using it in the future, since I have to switch from libre2 to libre3).