openScale icon indicating copy to clipboard operation
openScale copied to clipboard

Automatic Backups fail to generate files & shows "Last Backup: Never"

Open zotac99 opened this issue 3 months ago • 4 comments

Preflight Check (Required)

  • [x] I tested the latest dev version https://github.com/oliexdev/openScale/releases/tag/dev-build
  • [x] The issue still occurs in the dev version
  • [x] I searched the existing open and closed issues
  • [x] This issue has not already been reported or fixed

Bug Description

I've OpenScale in use for a while, reinstalled it on my Google Pixel 10 with GrapheneOS and restored my Backup from my previous phone (did also run on GrapheneOS). I've enabled Automatic Backups, chose the Backup location, set the Backup interval to daily and that it should overwrite existing backup files. For several days, i don't see new files generated and it also says 'Last Backup: Never'. I also tried the Dev-Build with restoring my data, also reinstalling the Stablebuild and resetting everything. I also have all GrapheneOS Settings for the App set to allow everything (Battery usage unrestricted & disabled Exploit protection). I also tried to leave the phone open with the app opened for several minutes. I anyways do weigh myself everyday and have the app open for several minutes. But nothing happens.

Description: After reinstalling OpenScale on a new Google Pixel 10 running GrapheneOS and restoring my previous backup, the automatic backup feature does not work. Despite configuring all settings correctly and applying all necessary device optimizations, no new backup files are created. The interface consistently displays Last Backup: Never.

Environment:

Device: Google Pixel 10
OS: GrapheneOS (latest stable)
App Versions Tested: Stable build & Dev build
Previous Device: Also ran GrapheneOS with backups working normally

Expected Behavior: A new backup file is generated at the configured interval (or shortly after triggering), and the UI updates to reflect the actual last backup date/time.

Actual Behavior: No new backup files are created. The UI persistently shows Last Backup: Never regardless of time passed or app activity.

Troubleshooting Already Performed:

Switched between Stable & Dev builds Fully uninstalled, cleared data, and reinstalled the app Reset all backup settings to defaults and reconfigured Applied GrapheneOS-specific optimizations (unrestricted battery, disabled exploit protection) Left device unlocked with OpenScale active for extended periods Verified daily weigh-in activity keeps app in foreground periodically

Additional Notes:

Backup location is correctly specified and writable.

Steps to Reproduce

  1. Install OpenScale (Stable or Dev) on Pixel 10 with GrapheneOS.
    
  2. Restore data/backup from previous device.
    
  3. Enable Automatic Backups, set interval to Daily, select a backup location, and enable Overwrite existing backup files.
    
  4. Configure GrapheneOS app settings: Unrestricted battery usage & Exploit protection disabled.
    
  5. Keep the phone active with OpenScale in the foreground for several minutes across multiple days (including daily weigh-ins).
    
  6. Monitor backup folder and UI timestamp.
    

Debug Log (Required)

| Field | Value |
|---|---|
| Time | 2026-08-06 12:56:27.066 |
| Timezone | Europe/Zurich (UTC 1h) |
| Session ID | 19fd6b7a3ba |
| App | openScale |
| Version | 3.1.1 (75) |
| Package | com.health.openscale |
| Build Type | release |
| Device | Google Pixel 10 |
| Android | 17 (API 37) |
| Build ID | 2026072901 |
| Build Time | 2026-06-01T03:31:27Z |
| Git SHA | dd93b18e |


? 2026-08-06 12:56:27.065 D/openScaleLog: Previous log file deleted on startup: openScale_current_log.txt
! 2026-08-06 12:56:27.065 W/openScaleLog: Failed to delete previous log file on startup: openScale_current_log.txt
? 2026-08-06 12:56:27.066 D/openScaleLog: Initial markdown-diff headers written to: /storage/emulated/0/Android/data/com.health.openscale/files/logs/openScale_current_log.txt
? 2026-08-06 12:56:27.066 D/openScaleLog: Initial markdown-diff headers written to: /storage/emulated/0/Android/data/com.health.openscale/files/logs/openScale_current_log.txt
+ 2026-08-06 12:56:27.066 I/openScaleLog: LogManager initialized. Logging to file: enabled. Log directory: /storage/emulated/0/Android/data/com.health.openscale/files/logs
? 2026-08-06 12:56:27.066 D/openScaleLog: Initial markdown-diff headers written to: /storage/emulated/0/Android/data/com.health.openscale/files/logs/openScale_current_log.txt
+ 2026-08-06 12:56:27.066 I/openScaleLog: LogManager initialized. Logging to file: enabled. Log directory: /storage/emulated/0/Android/data/com.health.openscale/files/logs
+ 2026-08-06 12:56:27.062 I/DatabaseProvider: DatabaseProvider initialized with file logging = true
+ 2026-08-06 12:56:27.062 I/OpenScaleApp: LogManager initialized. File logging enabled: true
+ 2026-08-06 12:56:27.198 I/BleConnector: Attempting to connect to MIBFS
? 2026-08-06 12:56:27.198 D/BleConnector: Switching to new device: Releasing active communicator: null
? 2026-08-06 12:56:27.198 D/BleConnector: Switching to new device: Active communicator released and set to null.
? 2026-08-06 12:56:27.198 D/ScaleHandlerFactory: createCommunicator: Searching for communicator for 'MIBFS' (CENSORED). Handler hint: 'Xiaomi Mi Scale v2'
+ 2026-08-06 12:56:27.198 I/ScaleHandlerFactory: Modern handler 'Xiaomi Mi Scale v2' supports 'MIBFS'.
+ 2026-08-06 12:56:27.201 I/ScaleHandlerFactory: Modern communicator 'GattScaleAdapter' created for 'MIBFS' with linkMode=CONNECT_GATT.
+ 2026-08-06 12:56:27.201 I/BleConnector: ActiveCommunicator successfully created: GattScaleAdapter. Starting observation job...
? 2026-08-06 12:56:27.201 D/BleConnector: Adapter isConnected: false for MIBFS (Status: CONNECTING)
+ 2026-08-06 12:56:27.202 I/BleConnector: Adapter no longer reports connected for MIBFS. Current status: CONNECTING. Expecting Disconnected Event.
+ 2026-08-06 12:56:27.206 I/BluetoothFacade: User context updated -> CENSORED
+ 2026-08-06 12:56:27.227 I/SharedViewModel: Derived backfill not needed for any user.
? 2026-08-06 13:03:10.384 D/UserSettingsRepository: Setting autoBackupEnabledGlobally to: false
+ 2026-08-06 13:03:10.424 I/AutoBackupUseCase: Auto-backup disabled or no URI; worker cancelled.
? 2026-08-06 13:03:11.136 D/UserSettingsRepository: Setting autoBackupEnabledGlobally to: true
+ 2026-08-06 13:03:11.155 I/AutoBackupUseCase: Auto-backup scheduled: interval=DAILY repeat=86400000ms flex=10800000ms
? 2026-08-06 13:03:18.161 D/UserSettingsRepository: Setting autoBackupLocationUri to: content://com.android.externalstorage.documents/tree/primary%3Aopenscale
+ 2026-08-06 13:03:18.177 I/AutoBackupUseCase: Auto-backup scheduled: interval=DAILY repeat=86400000ms flex=10800000ms
? 2026-08-06 13:03:22.308 D/UserSettingsRepository: Setting autoBackupInterval to: DAILY
+ 2026-08-06 13:03:22.333 I/AutoBackupUseCase: Auto-backup scheduled: interval=DAILY repeat=86400000ms flex=10800000ms
? 2026-08-06 13:03:23.640 D/UserSettingsRepository: Setting autoBackupCreateNewFile to: true
? 2026-08-06 13:03:24.180 D/UserSettingsRepository: Setting autoBackupCreateNewFile to: false
Image

zotac99 avatar Aug 06 '26 11:08 zotac99

Thanks for the report please try out the latest dev version.

oliexdev avatar Aug 07 '26 07:08 oliexdev

It instantly created a backup upon setting up the new dev version and making the autobackup settings. Will report back tomorrow, if there is a new version. Thank you very much!

zotac99 avatar Aug 07 '26 09:08 zotac99

It worked. It did just do a backup in the background. Thank you so much. Would it be maybe also be an option to implement the option to define the backup interval in hours? But thats just a detail. :)

zotac99 avatar Aug 08 '26 09:08 zotac99

no sorry the time doesn't really matter on the daily, weekly, monthly backup interval.

oliexdev avatar Aug 08 '26 09:08 oliexdev