Skip to content

Data lost when using 1.8.0 with redux-persist #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ouabing opened this issue Feb 19, 2020 · 2 comments
Closed

Data lost when using 1.8.0 with redux-persist #300

ouabing opened this issue Feb 19, 2020 · 2 comments

Comments

@ouabing
Copy link

ouabing commented Feb 19, 2020

Current behavior

I'm using redux-persist with AsyncStorage which will rehydrate store data on startup. After upgrading to 1.8.0, data got lost 100% on first start on iOS. The log shows Manifest does not exist when migrating but I dumped the container data and found the old data still live in Documents/RCTAsyncLocalStorage_V1.

Expected behavior

Upgrading to 1.8.0 will migrate old data smoothly.

Repro steps

Use a simple redux app with redux-persist can reproduce this issue.

Environment

  • Async Storage version: 1.8.0
  • React-Native version: 0.61.5
  • Platform tested: iPhone XR, iOS 13.3.1
  • Logs/Error that are relevant:
[RNCAsyncStorage.m:205] Failed to copy old storage directory to new storage directory location during migration: Error Domain=NSCocoaErrorDomain Code=4 "文件“RCTAsyncLocalStorage_V1”不存在。" UserInfo={NSSourceFilePathErrorKey=/var/mobile/Containers/Data/Application/BFCD6C74-6C53-468C-99F6-0278FA46B3E2/Documents/RCTAsyncLocalStorage_V1, NSUserStringVariant=(
    Copy
), NSDestinationFilePath=/var/mobile/Containers/Data/Application/BFCD6C74-6C53-468C-99F6-0278FA46B3E2/Library/Application Support/com.g-cores.GCGameMedia/RCTAsyncLocalStorage_V1, NSFilePath=/var/mobile/Containers/Data/Application/BFCD6C74-6C53-468C-99F6-0278FA46B3E2/Documents/RCTAsyncLocalStorage_V1, NSUnderlyingError=0x28376df80 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2020-02-19 09:57:35.331 [tid:com.facebook.react.AsyncLocalStorageQueue][RNCAsyncStorage.m:380] Manifest does not exist - creating a new one.
  • AppData Info
    image
@joonmanji
Copy link
Contributor

hey @ouabing this looks like the bug i've been trying to track down.. just opened a new issue. you beat me by 30 minutes :)
#301

@ouabing
Copy link
Author

ouabing commented Feb 19, 2020

@frankenthumbs provided a repro project, close this issue and see #301

@ouabing ouabing closed this as completed Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants