openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

App resets itself causing data loss

Open Al629176 opened this issue 4 months ago • 2 comments

Summary

The application unexpectedly resets to a default state, erasing user profile data such as avatars, settings, and possibly other stored data, causing significant user frustration and abandonment.

Problem

User-customized data (avatars, settings, and other stored state) is silently wiped after background updates, app restarts, or prolonged inactivity. The app appears freshly installed with no indication that data was lost or any recovery path offered.

Steps to reproduce

  1. Use the app normally, customizing avatar and settings.
  2. After some time (perhaps after a background update, app restart, or prolonged inactivity), the app resets to its initial state, losing all user customizations.

Expected: User data persists across sessions. Actual: Data is lost and app appears as if freshly installed.

Solution

Investigate data persistence mechanisms (e.g., local storage, database, file system) for possible corruption, misconfiguration, or race conditions. Check for unexpected data clearing during app updates or migrations. Implement robust error handling and data backup/recovery mechanisms. Add logging to trace when and why data is reset. Possibly add automated tests for data persistence.

Affected areas: Data persistence layer, User profile management, App initialization logic, Upgrade/migration routines

Acceptance criteria

  • [ ] User-customized data persists across app restarts and updates.
  • [ ] No unexpected resets occur under normal usage conditions.
  • [ ] If a reset is necessary (e.g., due to corruption), users are properly notified and legacy data recovery options are provided if possible.
  • [ ] Automated tests cover data persistence scenarios.

Related

None found by similarity search.

Al629176 avatar Aug 04 '26 06:08 Al629176

Triage note (2026-08-23)

Status: needs reproduction evidence before priority escalation. Needed: exact app version and platform, workspace path, launch logs, and evidence distinguishing deleted state from identity/workspace switching or an unreadable configuration.

Felyx-Fu avatar Aug 23 '26 13:08 Felyx-Fu

Closing as fixed.

The root cause was in resolve_config_dirs_ignoring_env: it called read_active_user_id_checked_async, which treated any transient active_user.toml read fault (Windows ERROR_SHARING_VIOLATION from AV/backup, OS permission error) as Ok(None) — the signed-out state. This caused the directory resolver to fall through to users/local and boot into a blank profile while real user data sat intact under users/<real-id>.

Fixed in PR #5337 (merged 2026-08-03): added retry-with-backoff (4 retries, 20 ms spacing) and persistent read failures now propagate as Err rather than laundering to None. Follow-up commits hardened workspace-switch ordering and caching.

Closing as a duplicate of #5334.

YellowSnnowmann avatar Sep 04 '26 07:09 YellowSnnowmann