Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-4139 in a recent build.
  1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    5
    Vote Rating
    0
    johnrix is on a distinguished road

      0  

    Default LocalStorage data corruption - robustness fix

    LocalStorage data corruption - robustness fix


    My application was somehow resulting in corruption of the local storage (the main index record for my store that has all of the record Ids in it contained ids for non-existent records). I don't know how this was occurring, but I am not doing anything particularly special. It may have been somehow related to other errors occurring within the application leaving the store in an unstable state, but I am only using the published mechanisms to manage the store.


    In any case, the corrupted data was causing the store load operation to fail with the following error:


    Uncaught TypeError: Cannot read property 'id' of undefined


    This was appearing within 'Ext.util.Collection.getKey()'. You can simulate it by manually editing the index record in the data store and add invalid Ids.


    The following robustness fix in Ext.data.proxy.WebStorage.read() solved the problem for me. Ideally, it would also clean up the offending Id from the index, but for my purposes, this is sufficient:


    Line 120:


    } else {
    for (i = 0; i < length; i++) {
    record = this.getRecord(ids[i]);
    if (record) {
    records.push(record);
    }
    }

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    We can take a look. I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    Oct 2007
    Posts
    25
    Vote Rating
    2
    erchan_2000 is on a distinguished road

      0  

    Default


    I'm having the exact same problem. Every once in a while, when I restore the data from LocalStorage, I get

    Uncaught TypeError: Cannot read property 'id' of undefined

    No idea why this is happening, but I worked around the problem by throwing an exception, cleanup localstorage and make the user re-login again.

  4. #4
    Sencha User
    Join Date
    Aug 2010
    Posts
    6
    Vote Rating
    1
    xanf is on a distinguished road

      0  

    Default


    Hi guys! I've hit the same problem and for me solution was quite simple - I was storing in local storage models with not-autogenerated id property. So (it's a well known behaviour in sencha) models were not stored to local storage, but store still contains references to them.
    Just double check - I'm pretty sure you are experiencing same issue

  5. #5
    Sencha User
    Join Date
    Mar 2013
    Posts
    5
    Vote Rating
    0
    johnrix is on a distinguished road

      0  

    Default


    I'm using auto-generated id values myself, so it is a different problem in my case.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi