localStorage and the dom_storage_quota manifest property don't appear to be working together

86 views
Skip to first unread message

james.m...@a-cti.com

unread,
Jan 28, 2014, 4:09:12 PM1/28/14
to node-...@googlegroups.com
Hello,

I'm not quite sure if I'm doing something wrong or not, but in the package.json manifest I set the following property:

 "dom_storage_quota": 1000

Now, that's in megabytes, yet I still end up with an error when adding things to storage:

Error: An attempt was made to add something to storage that exceeded the quota.

Now, the total length of the string I'm storing is:

localStorage.storage.length
10449325


Now, that doesn't seem like 1000 MB worth of data!

Neither does what I'm trying to add to it:

JSON.stringify(data).length
16466842

So, is this a bug, or is the dom_storage_quota not for the localStorage quota, but for one of the other storage API's instead?

Thank you for any help you can provide!  I'm using the 0.8.3 version of node-webkit:

process.versions["node-webkit"]
"0.8.4"

James

orthecr...@gmail.com

unread,
Jan 29, 2014, 10:43:45 PM1/29/14
to node-...@googlegroups.com, james.m...@a-cti.com
Seconded, I'm getting this quota exceeded error as well (storing 12mb of data) and I have dom_storage_quota at 4096. Version 0.8.4. Thanks!

ema...@gmail.com

unread,
Jul 27, 2016, 1:56:34 PM7/27/16
to nw.js, node-...@googlegroups.com
I am having the exact same problem.

using v0.12.2, v0.12.3 and even on v0.16.

Any hit how to solve this?

Andrew Lyon

unread,
Jul 27, 2016, 2:00:50 PM7/27/16
to ema...@gmail.com, nw.js, node-...@googlegroups.com
I think the fix for me was to move the storage directory out of the directory the app was in. For some reason, having the storage dir inside (as a child any level deep) of the app directory breaks it. Try explicitly setting your DOM storage directory to a location in the user's home. Not sure what the switch / option to do that is though.

--
You received this message because you are subscribed to a topic in the Google Groups "nw.js" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nwjs-general/HEg7U17417U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nwjs-general...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages