blackberry / BB10-WebWorks-Framework

The BB10 WebWorks Framework is packaged within an application BAR file to run on a BB10 device (or simulator)
60 stars 34 forks source link

LocalStorage limit incorrect #684

Open rtholmes opened 10 years ago

rtholmes commented 10 years ago

https://developer.blackberry.com/html5/api/localstorage.html

Specifies that bb10 allows up to 25 MB to be written to the local storage, but on BB v10.2.0.424 I see:

ERROR: (QUOTA_EXCEEDED_ERR): QUOTA_EXCEEDED_ERR: DOM Exception 22`

when writing a small string to a local store that contains 4.9917 MB of data.

The total was computed with:

var total = 0; for(var x in localStorage) {var val = ((localStorage[x].length * 2)/1024/1024); if (val > 0.1) console.log(x+" "+val)};

This is a regression as 10.1.0.1429 does not show the same error.

kwallis commented 10 years ago

Hi there. I believe this was only an issue briefly. Later 10.2 builds, which are the release versions, should not exhibit this. Can you please test on a newer version?

Thanks.

rtholmes commented 10 years ago

I tried this today on a Z10 Limited running 10.2.0.424.

rtholmes commented 10 years ago

Hi Ken,

Here is a minimal test case app (debug mode enabled): http://www.uploadmb.com/dw.php?id=1382738553

z10 running 10.2.0.424 failing after 4.75 MB: http://www.uploadmb.com/dw.php?id=1382738560

dev alpha c running 10.1.0.1429 failing after 24.75 MB written: http://www.uploadmb.com/dw.php?id=1382738557

ctetreault commented 10 years ago

Ken, it's failing for me on the latest internal builds right now too. I'll update the Jira item.

kwallis commented 10 years ago

Thanks Chad. We'll track this down.

riking commented 9 years ago

This seems to be still failing for some people, even with a small amount of data stored.

https://meta.discourse.org/t/blank-page-on-blackberry-10-browser/16375/2?u=riking

Keelan commented 9 years ago

FYI still fails for me on sites that require localstorage of a few kb.

rtholmes commented 9 years ago

Seeing this again; just trying to access localStorage for a simple web page through the console gives the following error (BB 10.2.1.3062):

> localStorage
> Error: QuotaExceededError: DOM Exception 22
code: 22
constructor: DOMExceptionConstructor
line: 2
message: "QuotaExceededError: DOM Exception 22"
name: "QuotaExceededError"
stack: "eval code↵eval@[native code]↵evaluate@[native code]↵call@[native code]↵_evaluateOn↵_evaluateAndWrap↵evaluate"
__proto__: DOMExceptionPrototype
scunliffe commented 8 years ago

This issue exists today for BB10 / Z10 OS 10.3.2.2836 (STL100-3)

The html5test.com site claims it works (because the API exists) however any attempt to get or set from localStorage fails.

Sadly because this is often looked up first on a site, the exception then blocks the page from continuing and the site appears entirely blank.

This used to work fine, a recent update seems to have borked this feature.