0

So I am making a chrome application and using the

chrome.storage.local.set

I have the 'unlimitedStorage' and 'storage' permissions set and the code I have works just fine with small amounts of videos and images. But as soon as I increase this amount, even slightly (Maybe going from 40MB to 80MB) it crashes the application when it tries to store.

Has anyone experienced this, as I understood it since I have the unlimitedStorage permission it shouldn't be a size issue, or is there still a limit in chrome.storage for a single item?

Thanks.

  • how are you safely storing an AoO as a string? i suspect as JSON, and the V8 implementation doesn't like anything anything bigger than a couple dozen MB (seems to increase over time, 10MB used to crash it...) – dandavis Jul 26 '16 at 17:37
  • No thats not what I meant sorry, I'm storying images and video inside of objects as Base64 encoded URI's. And then storing the objects into an array. – Michael Karan Jul 26 '16 at 17:38
  • you could probably store the long base64 strings directly under unique key names – dandavis Jul 26 '16 at 17:40
  • Yah that was exactly my next course of action. Was just seeing if there was something I was missing with this. Thanks though. – Michael Karan Jul 26 '16 at 17:40
  • For large objects one should use WebSQL or IndexedDB. – wOxxOm Jul 26 '16 at 18:24
  • Can I use WebSQL or indexedDB in chromeApps? – Michael Karan Jul 26 '16 at 18:25
  • See also [Is there a size limit like 32bytes or 64Bytes? for message passing between content scripts and background pages for chrome extensions?](http://stackoverflow.com/a/31928402) – wOxxOm Jul 26 '16 at 18:27
  • IndexedDB can be used in packaged apps https://developer.chrome.com/apps/offline_apps – wOxxOm Jul 26 '16 at 18:41

0 Answers0