rt2zz / redux-persist

persist and rehydrate a redux store
MIT License
12.97k stars 867 forks source link

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

Open prasanthyejje opened 5 years ago

prasanthyejje commented 5 years ago

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.

knightswatch3 commented 3 years ago

Did you get the solution for this ?

prasanthyejje commented 3 years ago

@SatishChandraPalakoti no. i didn't get any solution

scriptex commented 3 years ago

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.

stavalfi commented 2 years ago

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

Sebastiao-Domingos commented 1 year ago

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