7LPdWcaW / GrowTracker-Android

Grow tracking app for growing plants.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data loss bug

9YbQiuEohUu1 opened this issue · comments

I have been getting the same error in the past several weeks. It goes like this: upon launch, the app notifies me that there was a problem loading my data and shows empty gardens. The "encrypt data" and "fail safe" options in settings appear as "Redacted." The plants.json.bak file from android/data/me.anon.grow/files does not restore anything (even though it appears to have the correct size). Lost some data several times because of this.

are you able to send me either here or via email (7lpdwcaw@gmail.com) some of the json files you have as backup?

are you using encryption mode at all? that should only happen if it failed to read the data at all - perhaps the file wasnt saved correctly or the encryption mode is causing the app to behave unpredictably.

Sorry, I'm not comfortable sharing my data. However, I just opened the json files - and all the data is actually there. I don't know why I was unable to restore it.
Just to clarify: by "does not restore anything" I mean the following: I put the .bak file in the backups folder, select "restore from backup" and select the file (it appears as a file from 1970 cause it has no date in the filename, I suppose). It acts as it has restored ok but all gardens remain empty. I also tried renaming it to give it the proper date - just in case - but ended up with the same result.
I haven't been using encryption for quite some time now.

there will be 3 files you need to copy, all with the same timestamps in the file name, ending in .bak. that'll be why its showing as 1970 although it should still handle that for the 1 file being provided.

https://github.com/7LPdWcaW/GrowTracker-Android/blob/master/app/src/main/java/me/anon/lib/helper/BackupHelper.kt#L67

  • 2020-01-01-17-35-00.plants.json.bak
  • 2020-01-01-17-35-00.schedules.json.bak
  • 2020-01-01-17-35-00.gardens.json.bak

for example

Okay, one more update:

The plants.json.bak file from android/data/me.anon.grow/files does not restore anything (even though it appears to have the correct size).

Turns out the backup DID restore successfully, the plants just didn't show up in the correct garden (I guess because I didn't include the corresponding "gardens" file). To me it looked as if nothing happened because the garden remained empty.