rt2zz / redux-persist

persist and rehydrate a redux store
MIT License
12.95k stars 866 forks source link

Error in storage.getAllKeys #461

Open SupriyaKalghatgi opened 7 years ago

SupriyaKalghatgi commented 7 years ago

This is with "redux-persist": "4.10.0"

redux-persist/getStoredState: (In redux-persist/lib/getStoredState.js) - Error in storage.getAllKeys [Error: Failed to create storage directory.Error Domain=NSCocoaErrorDomain Code=512 "The file “ExponentExperienceData” couldn’t be saved in the folder “Documents”." UserInfo={NSFilePath=/Users/thatsme/Library/Developer/CoreSimulator/Devices/E6E55D19-F00A-4AB8-8155-8BC80DA4BC99/data/Containers/Data/Application/5BDEEDF7-37BB-4DDB-A400-D391BF432FB2/Documents/ExponentExperienceData, NSUnderlyingError=0x6040008446e0 {Error Domain=NSPOSIXErrorDomain Code=20 "Not a directory"}}]
rt2zz commented 7 years ago

what storage engine are you using? Is it plain react-native AsyncStorage?

SupriyaKalghatgi commented 7 years ago

I deleted the device with UDID E6E55D19-F00A-4AB8-8155-8BC80DA4BC99 and it worked

lsunsi commented 7 years ago

I'm getting a similar issue in test environment.

console.warn node_modules/redux-persist/lib/getStoredState.js:35
      redux-persist/getStoredState: Error in storage.getAllKeys

I think it has something to do with sensitive-storage adapter, but since it's coming from this package I thought it'd be better to start from here.

Am I missing something?

rt2zz commented 7 years ago

that definitely could be an issue with the storage adapter. I might recommend taking a look at upgrading to v5 which does not rely on getAllKeys

booleanBoy commented 6 years ago

@lsunsi Did you ever get it to work with sensitive-storage and, I assume, redux-persist-sensitive-storage?

Edit: sensitive-storage hadn't linked properly. After going through the manual android setup processes and rebuilding, everything worked fine.

lsunsi commented 6 years ago

@rt2zz Upgrading isn't an option since I'm using redux-loop. (':

@booleanBoy I'm using it with sensitive-storage, yeah. What exactly did you do to fix it?