Skip to content

Uncaught Error: QUOTA_EXCEEDED_ERR for localStorage #5

Open

Description

@pdeschen

Got the following error while interacting with the sandbox. I will try to inspect the actual localStorage content and report back. According to the spec, localStorage should be 5Mb which seems plenty enough for the sandbox history!

Maybe consider compress content before adding to the storage?

backbone-localStorage.min.js:8Uncaught Error: QUOTA_EXCEEDED_ERR: DOM Exception 22
_.extend.updatebackbone-localStorage.min.js:8
Backbone.syncbackbone-localStorage.min.js:8
f.extend.savebackbone.min.js:12
Sandbox.Model.Backbone.Model.extend.addHistorysandbox-console.js:86
Sandbox.Model.Backbone.Model.extend.evaluatesandbox-console.js:146
Sandbox.View.Backbone.View.extend.keydownsandbox-console.js:307
Njquery-1.6.1.min.js:16
f.event.handlejquery-1.6.1.min.js:17
f.event.add.i.handle.kjquery-1.6.1.min.js:16

Activity

  1. wjcrowcroft commented on Oct 21, 2011

    @wjcrowcroft
    Member

    Thanks - what browser were you in?

    Any ideas what commands were run that might have had an unusually large output?

    I can think of several ways to limit the history to prevent this from happening which I'll look into.

  2. pdeschen commented on Oct 21, 2011

    @pdeschen
    ContributorAuthor

    I'm on Chrome. I don't know if the quota is set for the whole browser or on a key basis. Hence, if that's for the whole browser, data could come from any webapp. Otherwise, I don't recall typing a 5Mb full of javascript:-)

    On a side note, maybe you could use the sessionStorage instead? I understand the idea of using a persistent localStorage but the sandbox might end up adding stuff forever. Another options would be to have a rolling history buffer like in a bash or something, with a configurable size. In fact, a flag could also be set during init to either use session or local storage (i.e. {persistentHistory: false})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions