iSoron / uhabits

Loop Habit Tracker, a mobile app for creating and maintaining long-term positive habits
GNU General Public License v3.0
7.8k stars 933 forks source link

App does not import repetitions after 21-01-2023 even though the data is contained in the .db backup file #1889

Open Spiralo-Idioide opened 9 months ago

Spiralo-Idioide commented 9 months ago

Pre-submission checklist

Description

Yesterday I exported a full backup of my habits.

When I tried to import the backup I realized the data after 21-01-2023 was not present. I first though the backup I just didn't contain the data. Maybe a bug in the export or an error on my end.

I then tried to open the db file with DB Browser for SQLite. As seen in the screenshot the recent data is present in the db file. 1701734400000 is epoch for 05-12-2023.

I have tried investigating the structure of the database but it seems everything is normal.

Steps to reproduce

  1. Go to Settings
  2. Click on Import Data
  3. Pick Loop Habits Backup 2023-12-05 184220.db
  4. Data after 21-01-2023 is not imported

System information

Screenshots

image

Files

Loop Habits Backup 2023-12-05 184220.db.zip

Spiralo-Idioide commented 9 months ago

Test

I did a test to see if it is a problem for all imports or just for importing my backup :

  1. Import the data backup I provided in the first post
  2. Randomly modifying data in the last two month for one of the habits
  3. Exporting a full backup
  4. Uninstalling the App
  5. Reinstalling the App
  6. Import the new backup
  7. The import of the randomly modified data backup worked

So it seems the problem is linked to a specific characteristic of my backup and not a problem for all imports. I am currently trying to find what is this characteristic.

Spiralo-Idioide commented 9 months ago

Update

Deleting all repetitions for an archived habits (Lamic 2) and the habits itself using DB Browser made the the import work.

I have no idea why. I am not closing this bug report myself considering the cause of the bug has not been found even though I found a solution that worked for me.

Screenshot

image