JohanDegraeve / xdripswift

xdrip for iOS, written in Swift
GNU General Public License v3.0
329 stars 328 forks source link

How to find the cause of a NightScoutUploadManager failure? #509

Open robster7674 opened 6 months ago

robster7674 commented 6 months ago

How can I get more information from logs for a NightScoutUploadManager failure? In logs I noticed this error:

2024-03-23 20:50:31.9920 5.0.2 4193 NightScoutUploadManager            failed to upload, error = Time-out van het verzoek.
2024-03-23 20:50:31.9990 5.0.2 4193 NightScoutUploadManager            result is not success
2024-03-23 20:50:32.0150 5.0.2 4193 NightScoutUploadManager            result = failed

Is there any way we can get more information on the reason for the time-out? Perhaps enabling debug logs in Xdrip?

NorthFlank logs filtered on 20:50 show only these entries:

2024-03-23T20:50:17.041956661Z stdout F data loaded: reloading sandbox data and updating plugins
2024-03-23T20:50:17.041952742Z stdout F      sgvs:599, treatments:1, profiles:1, sensorTreatments:1
2024-03-23T20:50:17.041936479Z stdout F Load Complete:
2024-03-23T20:50:01.953315659Z stdout F tick 2024-03-23T20:50:01.952Z

Does this mean the outgoing upload request at 20:50:17 never reached NorthFlank?

4gra commented 2 months ago

I had an issue trying to work out the interface between xdrip4io5 and Nightscout ( #559 ) but didn't get much further than you in debugging the details or precise content of the uploads. However I can confirm that's almost certainly what it looks like - the request timed out talking to the server, so it's probably not xdrip's "fault". You probably need to look for got data-received event, requesting reload on the nightscout server as a mark of success.