Closed ajaymore closed 6 years ago
Same here.
Seems related to these recent commits: https://github.com/rt2zz/redux-persist/commit/436050044d5ea6483d084c67820cd3fd9466eb38 and https://github.com/rt2zz/redux-persist/commit/98a78d9aa39d6634a39bd81c776d3ce91e0e7192
The same happens to me after upgrading to v5.7.1
Same story here :/
I just downgraded version to 5.6.12 and still not working
@avid21 Reverting back to 5.6.12 worked for me.
How to downgrade? Uninstall and re-install?
Use semver ~5.6.0
instead of ^5.6.0
. I forgot about it at first.
@NichAga Yes, it should work. I was using Remote JS debugging. I stopped it and hence naturally it's working now.
@JanithaR npm install redux-persist@5.6.12 @avid21 good :D
Same here! =(
Thanks @NichAga I figured it out. Just downgrade and keep working for the moment guys.
Yes, getting the same error. Reverting to 5.6.12 worked
Worked after switching back to redux-persist@5.6.12
Same 😡
Switch back to 5.6.12 works!
@jarvisluong yup im switch back to ~5.6.0
apologize for the churn here, v5.7.2 resolves the issue.
tests missed the issue on 5.7.1 as it was a console.error, not an actual exception
@rt2zz I still have the same error after update to v5.7.2.
I don't have this error with v.5.7.2. @RodolfoSilva are you sure that you upgrade version? You can check this in npm.lock or yarn.lock file.
@sytolk, Yes, I'm use the latest version and still have the error. This error only happens when I use the debug in the first time.
"redux-persist": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/redux-persist/-/redux-persist-5.7.2.tgz",
"integrity": "sha512-NgkSoPA3o6vAo09U5hnzO8CgHNhnBIcZyZBr+tRa/pDDeQqtcsP/zru9b2vz5tIpK6GCYGEsEjSzWUU/vxfRQA=="
},
I can confirm it's working with 5.7.2.
For me it was the short 'debounce' time which caused the error:
const persistOptions = {
storage,
debounce: 100, // <-- not working in 'Debug JS' mode
key: DeviceInfo.getBundleId(),
transforms: [compressor],
};
persistReducer(persistOptions, rootReducer)
I increased the time to 500 and now it's working fine.
react-native: v0.53.0 redux-persist: 5.9.1
Ok, that fixed not the error. I downgraded to v5.7.2 v5.6.12 and now it's working.
I have to say I've been stuck in this problem for a while now and it was my fault. I forgot to return an action on an Epic. I hope this helps anyone
I am stuck with this issue on my recently expo detached project. My state is never persisted regardless of remote debugging, and occasionally I get the error like the OP.
Expo: 24.0.0 react: 16.0.0 RN: Expo 24.0.0 fork react-redux: 5.0.7 redux: 3.7.2 redux-persist: 5.9.1
On an up note, thank you very much for your work!
Same as @calanti
"expo": "25.0.0",
"native-base": "2.3.1",
"react": "16.2.0",
"react-native": "0.52.0",
"react-navigation": "^1.4.0",
"react-redux": "5.0.7",
"redux": "3.7.2",
"redux-persist": "5.9.1"
I was getting the same error on redux-persist version 5.9.1.
It was working fine until I put the whitelist
prop into rootPersistConfig
:
const rootPersistConfig = { key: 'root', ... , whitelist: ['auth'] };
But then I switched back to using the blacklist
property and everything works fine now.
const rootPersistConfig = { key: 'root', ... , blacklist: ['navigation', 'isLoading', 'hasErrored'] };
Thanks for the insight and yes I am whitelisting, but blacklisting is not really a maintainable solution for me, too many recuders and I only need 2 whitelisted. Hopefully this can help the devs identify the issue though!
I have just created a new project with Expo and can not get this work either.
I get this issue with 5.9.1. For me it only occurs when remote debugging.
Potentially related to this issue with setTimeout in React Native https://github.com/facebook/react-native/issues/4470
Same as @ChristienGuy, only get the issue when remote debugging.
same here @ChristienGuy error when remote debugging :3
some issue with redux-persist V5.9.2 when debugger is open.
Running into this issue with redux-persist@latest on Android only (tested on API 27 and API 23). Seems to work fine on iOS.
Happens regardless of whether the debugger is attached or not, and I tried using both AsyncStorage and FilesystemStorage.
Rolling back to 5.6.12 and 5.7.2 have both yielded positive results for me, and seem to work just fine.
After trying a few different versions to no avail, I restarted my computer like I would have on Windows98. Everything is back to normal and working again. It's not a good solution, but may be worth a try if you are still stuck...(I was only getting the error in debug mode)
Appears to be working on 5.7.2
with remote JS Debugger.
Update: Error still occurs intermittently on
5.7.2
. But much less than5.9.2
.
I'm using version 5.9.1
, only show error when enable Remote JS Debugging
.
Still no solution?
Same issue: Android with Remote debugging on 5.9.1. Will try version 5.7.2.
Edit: 5.7.2 did not work, 5.6.12 looks ok.
same
"axios": "^0.18.0",
"expo": "^27.0.2",
"qs": "^6.5.2",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz",
"react-native-elements": "^0.19.1",
"react-navigation": "^2.0.1",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-persist": "^5.9.1",
"redux-thunk": "^2.2.0"
undefined is not an object (evaluating 'action.payload.search')
search in whitelist
using Redux Persist version 5.9.1 ... same issue
5.10 idem
"redux-persist": "^5.9.1"
I'm having the same issues. Still no fix? Or hints? Or clues?
@wmlutz restarting the android emulator and/or wiping the data of the device image via AVD Manager
Same issue for me on 5.10.0 - It's working correctly until I switch on remote debugging.
I also do encounter this error with redux-persist@5.10.0
.
The error message I'm getting during the persist/REHYDRATE
action is redux-persist: persist timed out for persist key "root"
.
As far as I understand, redux-persist
internally uses RN's AsyncStorage in order to store the state. Also, there is an issue when using AsyncStorage when debugging remotly, which makes the promise hang indefinitely (and may cause a timeout).
Could it be the reason why redux-persist
fails to load the state?
@nilscox are you using any middlewares like redux-logger? I faced the exact same issues as yours while Debugging JS remotely
redux-persist
was not working, threw err : persist timed out for persist key "root"
And however when I tried to run with remote debugger it threw an error saying TypeError: undefined is not an object (evaluating self.fetch)
- issue
even tried to fix it based on this snippet provided here
and once I removed redux-logger
the app started to behave in expected manner. Promises got resolved without timeout. Somehow made me feel all were connected! :confused:
Hope it helps someone! :raised_hands: Cheers!
I don't necessarily think this is an issue with redux-persist -- I use React Native Debugger, which has an option to Log AsyncStorage content
to console.
When I first cold boot an emulator and run the project, and start debugging remotely, I can see rehydrate works immediately for a while. During this time if I Log AsyncStorage content
then it will output the content to console immediately.
Once rehydrate starts timing out, if I Log AsyncStorage content
then I get nothing in my console... which makes me think this is more of an android emulator issue or asyncstorage issue...
@Arjith-Natarajan I am using redux-logger
. I will investigate if removing it can solve the problem.
@ilovett this is defenetly not a redux-persist
related error, but it has a side effect that makes redux-persist
timeout. It happens to me on a real device on Android, so I'm pretty sure it's not related to the emulator environment.
For now, I am using this workaround. I created this tool that allow to access a storage on my computer from my device. I am using it with a networkStorage adapter that I give to redux-persist
.
"react-redux": "5.0.7"
"redux": "4.0.0"
"redux-logger": "3.0.6"
"redux-persist": "^5.9.1"
"redux-saga": "0.16.0"
For me happens debugging and on android device.
I used "redux-persist": "^5.10.0"
on Next.js, first i got the same error, i tried to not set initialState or set to object empty {}
like this:
const store = createStore(persistedReducer, {})
It persisted and works fine.
I am using expo sdk version 25 My code is as below
reducers.js
configureStore.js
App.js