Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
DataStore Component used: androidx.datastore:datastore-preferences DataStore Version used: 1.1.0-beta02和1.1.1 Devices/Android versions reproduced on: Android 7.1
This is the error log:
My app is using DataStore to store user information. When I start the app, I read
user_info
and display the logged in and unlogged in status in the UI. Here is myUserRepository
related code:The
UserRepository
class is used in two places in the whole project. The first is to execute a one-time Worker task when starting the app, and the second is to display the avatar when the side menu is displayed to determine if there is a login. The following is the relevant code:An error occurred when executing the Worker code. The
repository.userInfoFlow.map
code was not executed, resulting in thedrawerItems
list returning an empty list and the UI not being displayed. This problem is a very serious error in my app😭When I saw the error log, I tried to use
ReplaceFileCorruptionHandler
to handle this problem and modified the code as follows:This makes my DataStore storage data loss that I reported before. It is difficult for me to tell whether it is a problem with RK3368 or DataStore. I come here to seek a solution🙏
drawerItems
no longer an empty list, andrepository.userInfoFlow.map
is also executed normally, but the data stored in user_info is lost. Currently, this problem only occurs on devices with RK3368 chips. I don’t know if it is related to a