-
Notifications
You must be signed in to change notification settings - Fork 471
storage upgrade from 1.2.1 to LEGACY branch doesn't upgrade correctly #301
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
Comments
Have the same issue. |
i put up a PR here. #303 definitely not my finest work.. would love feedback on it if possible. |
Also getting this issue after switching from React Native's (0.59.10) internal Async Storage implementation to this external package. 🙁 Going back to 1.7.1, currently it's not possible for us to use 1.8.0. |
Edit: this was just NPM being super smart. |
I experienced the same issue when migrate from 1.6.2 to 1.8.0. For now, using 1.7.1 is my workaround. |
should be fixed with 1.8.1. closing. |
Current behavior
when upgrading storage from 1.2.1 to the LEGACY branch, storage from an old directory is not being moved/copied over to the new directory... i believe this is happening because on
init
whenRCTStorageDirectoryMigrate
tries to migrate new data to[root]/data/Containers/Data/Application/[app id]/Library/Application Support/[bundle id]/RCTAsyncLocalStorage_V1
the folder doesn't exist. when i try to run the below code right before the filemanager attempts to copy over the data, migration[NSFileManager copyItemAtPath: toPath: Error:]
runs correctly:Expected behavior
We shouldn't get the warning and folder migration should happen correctly.
Repro steps
yarn
on rootpod install
on/ios
folderset storage to 'I Like to Save It'
to save a string to async storage@react-native-community/async-storage
togit://github.com/react-native-community/async-storage.git#4e49db6308882515a284a183c8e9daf5a50b33ef
to
yarn
andpod install
described in step 2 and 3Environment
2020-02-18 17:00:13.828 [warn][tid:com.facebook.react.JavaScript][RNCAsyncStorage.m:205] Failed to copy old storage directory to new storage directory location during migration: Error Domain=NSCocoaErrorDomain Code=4 "The file “RCTAsyncLocalStorage_V1” doesn’t exist." UserInfo={NSSourceFilePathErrorKey=/Users/joon.son/Library/Developer/CoreSimulator/Devices/A9A28D7F-CDD1-49EC-9138-356C0A9A7C4C/data/Containers/Data/Application/B8CAFA4D-89A5-4EE5-92F0-78B4406870D3/Documents/RCTAsyncLocalStorage_V1, NSUserStringVariant=( Copy ), NSDestinationFilePath=/Users/joon.son/Library/Developer/CoreSimulator/Devices/A9A28D7F-CDD1-49EC-9138-356C0A9A7C4C/data/Containers/Data/Application/B8CAFA4D-89A5-4EE5-92F0-78B4406870D3/Library/Application Support/com.nfl.mobile3/RCTAsyncLocalStorage_V1, NSFilePath=/Users/joon.son/Library/Developer/CoreSimulator/Devices/A9A28D7F-CDD1-49EC-9138-356C0A9A7C4C/data/Containers/Data/Application/B8CAFA4D-89A5-4EE5-92F0-78B4406870D3/Documents/RCTAsyncLocalStorage_V1, NSUnderlyingError=0x60000159a3a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
The text was updated successfully, but these errors were encountered: