timoschlueter / nightscout-librelink-up

Script written in TypeScript that uploads CGM readings from LibreLink Up to Nightscout.
MIT License
192 stars 246 forks source link

TypeError: Cannot read properties of null (reading 'FactoryTimestamp') #95

Closed marcosbianchi closed 5 months ago

marcosbianchi commented 1 year ago

Hi, I get this error running docker variant on my computer (Mac) . Authentication seems to work but then throws this error reading measurementDate:

image

Thanks in advance!

timoschlueter commented 1 year ago

Hi @marcosbianchi have you tried a different region by setting the environment variable?

marcosbianchi commented 1 year ago

Yes, tried changing it to EU but received this:

image

timoschlueter commented 1 year ago

Okay, looks good. Can you see current measurements in the LibreLink Up app using the same credentials?

marcosbianchi commented 1 year ago

Yes, app works fine with those credentials.

image

cjazinski commented 1 year ago

I have the same experience after updating to 2.4.0 due to the librelink update.

damianpowell commented 1 year ago

I have this experience too. Yes, I can see readings in the LibreLinkUp app. I'm in the UK using the EU2 region (as advised in the log). I'm using the docker variant.

aleb commented 8 months ago

According to https://gist.github.com/khskekec/6c13ba01b10d3018d816706a32ae8ab2 measurementData.connection.glucoseMeasurement represents the last glucose measurement.

The error can happen when there are no readings whatsoever in LibreLinkUp, or when glucoseMeasurement is not passed by the server for whatever reason.

Could probably add some checks to keep retrying instead of crashing the server.

timoschlueter commented 5 months ago

More information about crashes have been added to the latest version.