Closed burnedikt closed 1 year ago
Same/similar here. Unfortunately, the crash appears to be related to loss of data. About 5 days of treatment data were lost. I don't know for sure if the crash was the cause, at least it was coincident.
deduplicated treatments: [
{
eventType: 'Meal Bolus',
insulin: 3.5,
carbs: undefined,
notes: undefined,
app: 'diasend',
device: '<retracted>',
created_at: '2023-02-08T07:43:00.000Z'
},
{
eventType: 'Temp Basal',
absolute: 0.55,
duration: 360,
app: 'diasend',
device: '<retracted>',
created_at: '2023-02-08T07:50:27.000Z'
}
]
merged meal boli: [
{
eventType: 'Meal Bolus',
insulin: 3.5,
carbs: 20,
notes: undefined,
app: 'diasend',
device: '<retracted>',
created_at: '2023-02-08T07:43:00.000Z',
carbsReference: '2023-02-08T07:39:44.000Z 20g'
}
]
merged carb corrections: [
{
_id: 63e352db419663a6f1031d91,
eventType: 'Carb Correction',
carbs: 20,
app: 'diasend',
device: '<retracted>',
created_at: '2023-02-08T07:39:44.000Z',
utcOffset: 0
}
]
Sending 2 new treatments to nightscout
Removing 1 treatments from nightscout
Treatment delay (seconds) for 127 {
eventType: 'Temp Basal',
absolute: 0.55,
duration: 360,
app: 'diasend',
device: '<retracted>',
created_at: '2023-02-08T07:50:27.000Z'
}
Treatment delay (seconds) for 574 {
eventType: 'Meal Bolus',
insulin: 3.5,
carbs: 20,
notes: undefined,
app: 'diasend',
device: '<retracted>',
created_at: '2023-02-08T07:43:00.000Z',
carbsReference: '2023-02-08T07:39:44.000Z 20g'
}
(node:1) DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.
got data-received event, requesting reload
/opt/app/node_modules/mongodb/lib/utils.js:106
throw err;
^
TypeError: Cannot read property '_id' of undefined
at /opt/app/lib/server/treatments.js:133:30
at /opt/app/node_modules/mongodb/lib/utils.js:384:17
at /opt/app/node_modules/mongodb/lib/utils.js:372:11
at ClientSession.endSession (/opt/app/node_modules/mongodb/lib/core/sessions.js:146:41)
at executeCallback (/opt/app/node_modules/mongodb/lib/utils.js:369:17)
at handleCallback (/opt/app/node_modules/mongodb/lib/utils.js:102:55)
at /opt/app/node_modules/mongodb/lib/operations/common_functions.js:322:5
at handler (/opt/app/node_modules/mongodb/lib/core/sdam/topology.js:942:24)
at /opt/app/node_modules/mongodb/lib/cmap/connection_pool.js:356:13
at handleOperationResult (/opt/app/node_modules/mongodb/lib/core/sdam/server.js:558:5)
I've experienced a crash of the bridge today running as a nightscout plugin and using NS's internal API to push / delete treatments:
Version 2.0.2 of bridge