[SQLCipher] Database Corruption After User Switch with "Remember Me" - Persists After Reinstall
Description
When a user enables the "Remember Me" checkbox during login and then attempts to log in as a different user, the application's transactional sync fails with a SQLiteNotADatabaseException. This error persists even after completely uninstalling and reinstalling the application, indicating the problem is related to persistent, encrypted storage that survives an app uninstall.
Error
net.zetetic.database.sqlcipher.SQLiteNotADatabaseException: file is not a database (code 26)", while compiling: SELECT COUNT(*) FROM sqlite_schema
Steps to Reproduce
- On a clean install, log in as User A with the "Remember Me" checkbox checked
- Log out of the application
- Attempt to log in as User B (with or without "Remember Me")
- Observe the transactional sync failure error
- Uninstall the application
- Reinstall the application
- Attempt to log in again (as any user) - the sync error persists
Expected Behavior
- Switching users should not corrupt the underlying database
- If corruption occurs, the app should have a recovery mechanism (e.g., deleting corrupted database and creating new one)
- Uninstalling the application should completely remove all user data, allowing fresh start upon reinstall
Environment
- SDK Version: 13.1.0
- React Native: TypeScript template
- Platforms: iOS & Android
[SQLCipher] Database Corruption After User Switch with "Remember Me" - Persists After Reinstall
Description
When a user enables the "Remember Me" checkbox during login and then attempts to log in as a different user, the application's transactional sync fails with a
SQLiteNotADatabaseException. This error persists even after completely uninstalling and reinstalling the application, indicating the problem is related to persistent, encrypted storage that survives an app uninstall.Error
net.zetetic.database.sqlcipher.SQLiteNotADatabaseException: file is not a database (code 26)", while compiling: SELECT COUNT(*) FROM sqlite_schema
Steps to Reproduce
Expected Behavior
Environment