redux-persist icon indicating copy to clipboard operation
redux-persist copied to clipboard

Failed to execute 'setItem' on 'Storage': Setting the value of 'persist:Universal' exceeded the quota

Open prasanthyejje opened this issue 4 years ago • 5 comments

my one of the reducers is not persisting the data because of this issue.

Error storing data DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'persist:Universal' exceeded the quota.

i'm using multiple reduces to manage the app state.

I'm Using these versions in my application: "redux-logger": "^3.0.6", "redux-persist": "^5.9.1", "redux-thunk": "^2.2.0", "react-redux": "^5.0.7", "react": "16.4.0",

it's been long time that i'm trying to resolve this, can you please help me to get out of this issue. Thanks in advance.

prasanthyejje avatar Oct 15 '19 10:10 prasanthyejje

Did you get the solution for this ?

knightswatch3 avatar Apr 05 '21 18:04 knightswatch3

@SatishChandraPalakoti no. i didn't get any solution

prasanthyejje avatar Jul 30 '21 14:07 prasanthyejje

I just experienced the same issue which brought me here.

This has nothing to do with redux-persist but is related to limitations in the browser APIs.

This error usually occurs when you reach the limit to which you can store value in single localStorage key.

This limit is set to 5200000 characters in Chrome and Firefox, not sure about the rest of the browsers. (source: this StackOverflow answer, which also contains a link to a demo.

So I can think of two solutions right now:

  1. A dirty and quick one is to temporarily disable persisting of redux store by effectively removing the redux-persist package until you implement 2.
  2. Split the particular store branch into multiple smaller branches in order to make it fit the limit.

I will go with 1. now because the project allows it but if you can't, then you should invest time and refactor your redux store/branch.

scriptex avatar Aug 19 '21 06:08 scriptex

Solution: https://github.com/rt2zz/redux-persist/issues/870#issuecomment-685145162

stavalfi avatar Aug 25 '22 05:08 stavalfi

boa tarde a todos também estou a passar o mesmo problemas

Sebastiao-Domingos avatar Dec 29 '22 16:12 Sebastiao-Domingos