Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8667717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:02:21+00:00 2026-06-12T18:02:21+00:00

I get TypeError: Result of expression ‘localStorage’ [null] is not an object when I

  • 0

I get

TypeError: Result of expression ‘localStorage’ [null] is not an object

when I try access to localStorage on Symbian/Phonegap app
Looks like this related to error that ocurr before:

TypeError: Result of expression ‘window.widget.preferenceForKey’ [undefined] is not a function.
that ocurr in line var pref = window.widget.preferenceForKey(Storage.PREFERENCE_KEY);

function Storage() {
    this.available = true;
    this.serialized = null;
    this.items = null;

    if (!window.widget) {
        this.available = false;
        return;
    }
    var pref = window.widget.preferenceForKey(Storage.PREFERENCE_KEY);

    //storage not yet created
    if (pref == "undefined" || pref == undefined) {
        this.length = 0;
        this.serialized = "({})";
        this.items = {};
        window.widget.setPreferenceForKey(this.serialized, Storage.PREFERENCE_KEY);
    } else {
        this.serialized = pref;'({"store_test": { "key": "store_test", "data": "asdfasdfs" },})';
        this.items = eval(this.serialized);
    }
}

It seems that I need to resolve local storage I don `t know how to do it.
Any workaround?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:02:22+00:00Added an answer on June 12, 2026 at 6:02 pm

    I have actually struggled with this problem myself.

    A simple work around is to avoid preferenceForKey all together and instead use preference.

    <script>
        var value = "Information to be stored";
        var key = "key";
        widget.preference["key"] = value;
     </script>
    

    You can the retreive this information later.

    <script>
        var value = widget.preference["key"];
        alert(value);
    </script>
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

TypeError: Result of expression 'this._configure' [undefined] is not a function. I keep running into
I get this error: TypeError: object.__init__() takes no parameters when running my code, I
var data = {}; .... data[someprop][someotherprop] = 'bla bla' I get Uncaught TypeError: Cannot
I get this error TypeError at /debate/1/ get_context_data() takes exactly 2 arguments (1 given)
I have a function friend_exists like this: def friend_exists(request, pid): result = False try:
I get a problem in a form handler in app engine (Python). Basically when
Why I am getting typeError value is null but In my firebug I can
When I try this code: class MyStuff: def average(a, b, c): # Get the
When I run the code below, Safari's debug console tells me: TypeError: Result of
If I console.log($('#result-template').html()), I get: {{#each this}} <tr> <td>{{MfgName}}</td> <td><button type=submit name=MfgID value={{MfgID}}>Select</button></td> </tr>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.