-
Notifications
You must be signed in to change notification settings - Fork 30.5k
[shared_preferences] [windows,linux] Data can be corrupted due to lack of atomic file writes #89211
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopp: shared_preferencesPlugin to read and write Shared PreferencesPlugin to read and write Shared Preferencespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopp: shared_preferencesPlugin to read and write Shared PreferencesPlugin to read and write Shared Preferencespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Type
Fields
Give feedbackNo fields configured for issues without a type.
This code simply fails with an error if config file is broken. Maybe it's good to clear preferences file if it contains an error. I do not know why the preferences file breaks but since i've published my app, there were some users, who reported this issue.
Platform where i faced this issue: Windows.
Flutter version: 2.2.3 from stable channel.
I have no idea why but file becomes something like this
