toz/MediLog
9
51
Fork
You've already forked MediLog
3

Data is regularly lost #477

Closed
opened 2025年04月11日 11:22:23 +02:00 by bochecha · 28 comments

I use Medilog to keep track of water intake, and regularly, I have some data that is lost.

For example, today, I recorded a few things during the night, but after that I recorded something which appeared as the first record of the day. 😕

This happens regularly enough that I can't really rely on this app anymore, even though it has automatic save and backups, which by the way is a great thing to have.

Sorry I don't have anything more accurate and detailed than "it loses data", but if you explain to me what to look for I'd be happy to give you a more actionable bug report. 😊

I use Medilog to keep track of water intake, and regularly, I have some data that is lost. For example, today, I recorded a few things during the night, but after that I recorded something which appeared as the first record of the day. 😕 This happens regularly enough that I can't really rely on this app anymore, even though it has automatic save and backups, which by the way is a great thing to have. Sorry I don't have anything more accurate and detailed than "it loses data", but if you explain to me what to look for I'd be happy to give you a more actionable bug report. 😊
Owner
Copy link

This is really bad to hear!

Given that this is the first time I hear of this so let's confirm a few details so I know into which corner I need to look into:

  • What's your exact version or build of MediLog
  • Are you using any other tabs, and if so, ever seen the same issue there?
  • Do you you have daily summaries on or off? Is changing that setting doing anything to the situation?
  • Can you check the filter settings of your tab. Anything set there which could prevent those entries to show up?
  • Does a backup show those lost entries or are they missing there as well?
  • If you happen to have a rough date and time of such lost entries I'd be happy to have a look at a backup of yours and check if there are any odd entries. https://cloud.zell-mbc.com/s/medilogUpload
This is really bad to hear! Given that this is the first time I hear of this so let's confirm a few details so I know into which corner I need to look into: - What's your exact version or build of MediLog - Are you using any other tabs, and if so, ever seen the same issue there? - Do you you have daily summaries on or off? Is changing that setting doing anything to the situation? - Can you check the filter settings of your tab. Anything set there which could prevent those entries to show up? - Does a backup show those lost entries or are they missing there as well? - If you happen to have a rough date and time of such lost entries I'd be happy to have a look at a backup of yours and check if there are any odd entries. https://cloud.zell-mbc.com/s/medilogUpload

Hi, the version I use is the latest from f-droid: 3.1.2, 5466

I use the water tab, the journal and temperature, but I almost exclusively use the water tab daily. I use it a lot 😅

Daily summaries for the PDF are on, but off for the graph, does that have an impact? 🤔

I can't find any filter setting for the "water" tab 😕

A rouge date and time would be all the entries from the night from 10 to 11th April, there are some around 4am and 7am more or less.

I'll try to have a look at the backups now 😉

Hi, the version I use is the latest from f-droid: 3.1.2, 5466 I use the water tab, the journal and temperature, but I almost exclusively use the water tab daily. I use it *a lot* 😅 Daily summaries for the PDF are on, but off for the graph, does that have an impact? 🤔 I can't find any filter setting for the "water" tab 😕 A rouge date and time would be all the entries from the night from 10 to 11th April, there are some around 4am and 7am more or less. I'll try to have a look at the backups now 😉

Looked at the backup, and indeed, those date/times aren't in there, so they were really completely lost. 😭

Looked at the backup, and indeed, those date/times aren't in there, so they were really completely lost. 😭
Owner
Copy link

Thanks for getting back!
The filter setting would be here:
image

If the icon looks like in this screenshot the filter is off and all data should be shown.

I saw you uploaded a backup, thanks. It looks like you accidentally picked an old one though? MediLog-2023年01月21日?

Thanks for getting back! The filter setting would be here: ![image](/attachments/399962b9-5cef-43cf-881d-eb83373dc1a9) If the icon looks like in this screenshot the filter is off and all data should be shown. I saw you uploaded a backup, thanks. It looks like you accidentally picked an old one though? MediLog-2023年01月21日?

Hi, thank you for the reply, somehow I never got a notification about your comment. 😖

So, that filter indeed looks like the one on yourscreenshot, which means it is off. 🤷

Meanwhile I'm trying to get into the habit of constantly saving the data to avoid more data loss, but I regulary forget to do it as I have big memory issues ever since I caught a bad flu which attacked my brain and spinal chord 😭

I uploaded a new backup which I did just before uploading it, should be 2025年05月11日 this time, and sorry about last time.

Hi, thank you for the reply, somehow I never got a notification about your comment. 😖 So, that filter indeed looks like the one on yourscreenshot, which means it is off. 🤷 Meanwhile I'm trying to get into the habit of constantly saving the data to avoid more data loss, but I regulary forget to do it as I have big memory issues ever since I caught a bad flu which attacked my brain and spinal chord 😭 I uploaded a new backup which I did just before uploading it, should be `2025年05月11日` this time, and sorry about last time.
Owner
Copy link

Time stamp looks good, but the file is password protected?

Time stamp looks good, but the file is password protected?

@toz wrote in #477 (comment):

Time stamp looks good, but the file is password protected?

Huh? 🤔

Ah yes, it is 😖

So sorry about that, I had ,no idea it would be protected by a pasword, it is just the backup generated by Medilog. 😕

Is that expected? 🤔

in any case, here it is again, at the same place, but this time it's MediLog-Backup-2025年05月11日 12-07-45-2.zip

@toz wrote in https://codeberg.org/toz/MediLog/issues/477#issuecomment-4438466: > Time stamp looks good, but the file is password protected? Huh? 🤔 Ah yes, it is 😖 So sorry about that, I had ,no idea it would be protected by a pasword, it is just the backup generated by Medilog. 😕 Is that expected? 🤔 in any case, here it is again, at the same place, but this time it's `MediLog-Backup-2025年05月11日 12-07-45-2.zip`
Owner
Copy link

If you set a password in settings all of your automated backups will be protected with that password, so, yes, works as intended.
I was able to open the latest file and will get on top of it today.

By the way, you did you create this zip file yourself, did you? Reason for asking is that your zip file has your data in a subfolder and was tearing my hair out why the hell the import code all of a sudden seemed to be broken.
Oh well, another opportunity to add some more resilience to the restore code.

Right now I got no clue as to what happens, so I might ask you to install a debug version with some more Text notifications left and right so I can narrow down where things go wrong. We'll see...

Edit:
You truly got a lot of data, which is good as it allows for some stress testing. You might want to consider enabling a filter, let's say 3 months rolling. Because with more than 5000 records in display the ui may become really slow?

As you may have noticed from the response to your other post, there have been some significant code changes with Fluid recently, hence instead of me stabbing in the dark I would propose I compile a dedicated version for you which provides some additional notifications.

A few more que4stions which came to my mind:

  • Is your database encrypted? Check in about dialog
  • How do you enter your data, quick entry mode off or on?
  • What does losing data look like exactly? You enter a record and later on it appears like it wasn't saved, or rather some data which you know was there before is missing all of a sudden?
If you set a password in settings all of your automated backups will be protected with that password, so, yes, works as intended. I was able to open the latest file and will get on top of it today. By the way, you did you create this zip file yourself, did you? Reason for asking is that your zip file has your data in a subfolder and was tearing my hair out why the hell the import code all of a sudden seemed to be broken. Oh well, another opportunity to add some more resilience to the restore code. Right now I got no clue as to what happens, so I might ask you to install a debug version with some more Text notifications left and right so I can narrow down where things go wrong. We'll see... Edit: You truly got a lot of data, which is good as it allows for some stress testing. You might want to consider enabling a filter, let's say 3 months rolling. Because with more than 5000 records in display the ui may become really slow? As you may have noticed from the response to your other post, there have been some significant code changes with Fluid recently, hence instead of me stabbing in the dark I would propose I compile a dedicated version for you which provides some additional notifications. A few more que4stions which came to my mind: - Is your database encrypted? Check in about dialog - How do you enter your data, quick entry mode off or on? - What does losing data look like exactly? You enter a record and later on it appears like it wasn't saved, or rather some data which you know was there before is missing all of a sudden?

Ah, yes, I created the zip file on my laptop, just extracted the zip from Medilog, put the contents in a folder then zipped the folder.

Sure, no problem, I can install that debug version as soon as it is ready. 😉

Ah, yes, I created the zip file on my laptop, just extracted the zip from Medilog, put the contents in a folder then zipped the folder. Sure, no problem, I can install that debug version as soon as it is ready. 😉

@toz wrote in #477 (comment):

Edit: You truly got a lot of data, which is good as it allows for some stress testing. You might want to consider enabling a filter, let's say 3 months rolling. Because with more than 5000 records in display the ui may become really slow?

I can do that, yes, but I didn't find anything in the UI that looks like this 😕

In any case, so far I haven't seen the UI getting any slower, but it might so I'm all for filtering things. 😉

As you may have noticed from the response to your other post, there have been some significant code changes with Fluid recently, hence instead of me stabbing in the dark I would propose I compile a dedicated version for you which provides some additional notifications.

Alright, shoot and I'll try any build you want. 😉

A few more que4stions which came to my mind:

* Is your database encrypted? Check in about dialog

It is, yes, is that a problem? 🤔

* How do you enter your data, quick entry mode off or on?

It is on, is that a problem? 🤔

* What does losing data look like exactly? You enter a record and later on it appears like it wasn't saved, or rather some data which you know was there before is missing all of a sudden?

That, I know for a fact I had entered some things in the past, but it isn't there anymore.

@toz wrote in https://codeberg.org/toz/MediLog/issues/477#issuecomment-4455186: > Edit: You truly got a lot of data, which is good as it allows for some stress testing. You might want to consider enabling a filter, let's say 3 months rolling. Because with more than 5000 records in display the ui may become really slow? I can do that, yes, but I didn't find anything in the UI that looks like this 😕 In any case, so far I haven't seen the UI getting any slower, but it might so I'm all for filtering things. 😉 > As you may have noticed from the response to your other post, there have been some significant code changes with Fluid recently, hence instead of me stabbing in the dark I would propose I compile a dedicated version for you which provides some additional notifications. Alright, shoot and I'll try any build you want. 😉 > A few more que4stions which came to my mind: > > * Is your database encrypted? Check in about dialog It is, yes, is that a problem? 🤔 > * How do you enter your data, quick entry mode off or on? It is on, is that a problem? 🤔 > * What does losing data look like exactly? You enter a record and later on it appears like it wasn't saved, or rather some data which you know was there before is missing all of a sudden? That, I know for a fact I had entered some things in the past, but it isn't there anymore.
Owner
Copy link

None of these are problems, it's just for me to narrow down the moving parts. If e.g. you are using quick entry I don't need to look into "slow entry" part of the code.

<<That, I know for a fact I had entered some things in the past, but it isn't there anymore.>>
Entered yes, but maybe what you entered never got stored without you noticing. If those entries showed up in the tab they were stored in the db at least for a while. If you maybe entered some data late at night, hit save and then went on with the night, you may have not noticed that that entry got lost right away, never got stored?

The reason why I am so pedantic about this is, that not storing upon entering is a completely different thing than losing data which has been in the DB already.

<< but I didn't find anything in the UI that looks like this >>
The screen shot a bit higher up shows an arrow pointing to the filter button?

None of these are problems, it's just for me to narrow down the moving parts. If e.g. you are using quick entry I don't need to look into "slow entry" part of the code. <<That, I know for a fact I had entered some things in the past, but it isn't there anymore.>> Entered yes, but maybe what you entered never got stored without you noticing. If those entries showed up in the tab they were stored in the db at least for a while. If you maybe entered some data late at night, hit save and then went on with the night, you may have not noticed that that entry got lost right away, never got stored? The reason why I am so pedantic about this is, that not storing upon entering is a completely different thing than losing data which has been in the DB already. << but I didn't find anything in the UI that looks like this >> The screen shot a bit higher up shows an arrow pointing to the filter button?

@toz wrote in #477 (comment):

None of these are problems, it's just for me to narrow down the moving parts. If e.g. you are using quick entry I don't need to look into "slow entry" part of the code.

Understood, so yes I am indeed using quick entry.

<<That, I know for a fact I had entered some things in the past, but it isn't there anymore.>> Entered yes, but maybe what you entered never got stored without you noticing. If those entries showed up in the tab they were stored in the db at least for a while. If you maybe entered some data late at night, hit save and then went on with the night, you may have not noticed that that entry got lost right away, never got stored?

The reason why I am so pedantic about this is, that not storing upon entering is a completely different thing than losing data which has been in the DB already.

The thing is I have no way to know the data has been entered in the db, all I know is I entered the data in the form, whether it has been committed to the DB is another thing entirely 🤷

<< but I didn't find anything in the UI that looks like this >> The screen shot a bit higher up shows an arrow pointing to the filter button?

Ah, indeed, I assumed clicking that button would just toggle on or off, but I did try it and found how to filter things on a sliding window of 6 months 😄

@toz wrote in https://codeberg.org/toz/MediLog/issues/477#issuecomment-4468527: > None of these are problems, it's just for me to narrow down the moving parts. If e.g. you are using quick entry I don't need to look into "slow entry" part of the code. Understood, so yes I am indeed using quick entry. > <<That, I know for a fact I had entered some things in the past, but it isn't there anymore.>> Entered yes, but maybe what you entered never got stored without you noticing. If those entries showed up in the tab they were stored in the db at least for a while. If you maybe entered some data late at night, hit save and then went on with the night, you may have not noticed that that entry got lost right away, never got stored? > > The reason why I am so pedantic about this is, that not storing upon entering is a completely different thing than losing data which has been in the DB already. The thing is I have no way to know the data has been entered in the db, all I know is I entered the data in the form, whether it has been committed to the DB is another thing entirely 🤷 > << but I didn't find anything in the UI that looks like this >> The screen shot a bit higher up shows an arrow pointing to the filter button? Ah, indeed, I assumed clicking that button would just toggle on or off, but I did try it and found how to filter things on a sliding window of 6 months 😄
Owner
Copy link

I have published a debug release for you here: https://cloud.zell-mbc.com/s/medilogDownload
Look for bochecha-release.apk

It's based on the latest v3.2.5 release and will show the message below with every write attempt:
image

Record count should go up, one by one.
If the record count doesn't match what I expect it will show the below:
image

I have published a debug release for you here: https://cloud.zell-mbc.com/s/medilogDownload Look for _bochecha-release.apk_ It's based on the latest v3.2.5 release and will show the message below with every write attempt: ![image](/attachments/44400ef0-213e-4105-9942-6a46a579e6e7) Record count should go up, one by one. If the record count doesn't match what I expect it will show the below: ![image](/attachments/da7e2910-c471-4e41-9a70-a98a5ed9db3a)

Thank you for the debug release, how do I install it though? I just click on the app and it will install? Or is there something more to do? (I know how to install rpms on my laptop or even how to build them, but I know nothing about phones 😅)

Thank you for the debug release, how do I install it though? I just click on the app and it will install? Or is there something more to do? (I know how to install rpms on my laptop or even how to build them, but I know nothing about phones 😅)
Owner
Copy link

That's it, click on the app and it will install. One important thing though. Two MediLog's can't coexist, hence Android will most likely ask you to remove the existing app -> Make sure your backup is current so you can import after installing the debug release.

That's it, click on the app and it will install. One important thing though. Two MediLog's can't coexist, hence Android will most likely ask you to remove the existing app -> Make sure your backup is current so you can import after installing the debug release.

Hmm, I can't find how to import my backup 😖

Hmm, I can't find how to import my backup 😖
Owner
Copy link

Settings/Data Management/Restore ?

Settings/Data Management/Restore ?

Hmm, I can't see à "data management" here, would be "gestion des données" in French I guess...

Hmm, I can't see à "data management" here, would be "gestion des données" in French I guess...
Owner
Copy link

: Menu /Data Management/Restore

image

: Menu /Data Management/Restore ![image](/attachments/f0214a4b-205d-4d83-aa38-f77d6f4d20cf)

Aaaaah ! When you said "settings" I wrongly assumed you meant for me to actually open the settings. 🤦

The screenshots I took were from that settings dialog...

Aaaaah ! When you said "settings" I wrongly assumed you meant for me to actually open the settings. 🤦 The screenshots I took were from that settings dialog...

So, I am now running your debug version, hope that can give you more info about what happens to me 😉

So, I am now running your debug version, hope that can give you more info about what happens to me 😉

Hi, I had a problem with my phone so I had to uninstall Medilog and reinstall it, I am now back on the F-droid version and I can't find the bochecha-release.apk in that folder you linked to above 😕

Hi, I had a problem with my phone so I had to uninstall Medilog and reinstall it, I am now back on the F-droid version and I can't find the bochecha-release.apk in that folder you linked to above 😕
Owner
Copy link

I didn't keep it for long I am afraid. Does the current F-Droid release still show that behaviour?

I didn't keep it for long I am afraid. Does the current F-Droid release still show that behaviour?

Hard to say as I got used to make a backup after every entry 😅

However, the latest fdroid release doesn't have the tags feature to track both intake and outtake, which was really nice. 🥰

Hard to say as I got used to make a backup after every entry 😅 However, the latest fdroid release doesn't have the tags feature to track both intake and outtake, which was **really** nice. 🥰
Owner
Copy link

Tag support is still there, it's an experimental feature which you need to enable in Settings first.
image

I did however notice that when you change the setting, the tag icon won't show up right away. You need to navigate to e.g. About to make the changed setting to be reloaded again. That will be fixed in the next release.

Tag support is still there, it's an experimental feature which you need to enable in Settings first. ![image](/attachments/baf3fdb6-5c23-4b7f-b0ce-0234b26381b0) I did however notice that when you change the setting, the tag icon won't show up right away. You need to navigate to e.g. About to make the changed setting to be reloaded again. That will be fixed in the next release.

Ah, I see, thanks for the screenshot which showed me how to enable it 👌

Ah, I see, thanks for the screenshot which showed me how to enable it 👌
Owner
Copy link

I guess I can close this one by now...

I guess I can close this one by now...
Sign in to join this conversation.
No Branch/Tag specified
main
3.6.0
3.3.8
master
v3.3.2
v3.2.7
v3.2.5
v3.2.1
v3.2.0
v3.1.2
v3.1.0
v3.0.7
v3.0.6
v3.0.5
v3.0.4
v2.7.4
v3.0.3
v3.0.1
v3.0.0
v2.7.3
v2.7.2
v2.7.1
v2.7.0
v2.6.3
v2.6.2
v2.6.0
v2.5.11
v2.5.10
v2.5.9
v2.5.8
v2.5.7
v2.5.6
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.1
v2.5.0
v2.4.8
v2.4.7
v2.4.6
v2.4.5
v2.4.4
v2.4.3
v2.4.2
v2.4.0
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v3.7.1
v3.6.5
v3.6.4
v3.6.3
v3.6.2
v3.6.0
v3.5.1
v3.5.0
v3.4.1
v3.4.0
v3.3.11
v3.3.10
v3.3.9
v3.3.8
v3.3.7
v3.3.6
v3.3.5
v3.3.4
v3.3.3
v3.3.2
v3.2.7
v3.2.6
v3.2.5
v3.2.4
v3.2.3
v3.2.1
v3.2.0
v3.1.2
v3.1.1
v3.1.0
v3.0.7
v3.0.6
v3.0.5
v3.0.4
v3.0.3
v3.0.2
v3.0.1
v3.0.0
v2.7.3
v2.7.2
v2.7.1
v2.7.0
v2.6.3
v2.6.2
v2.6.1
v2.6.0
v2.5.11
v2.5.10
v2.5.9
v2.5.8
v2.5.7
v2.5.6
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.1
v2.5.0
v2.4.8
v2.4.7
v2.4.6
v2.4.5
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v2.3.0
v2.2.5
v2.2.4
v2.2.3
v2.2.1
v2.2.2
v2.2.0
v2.1.2
v2.1.1
v2.1.0
v2.0.6
v2.0.5
v2.0.1
v3.7.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toz/MediLog#477
Reference in a new issue
toz/MediLog
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?