Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    16
    Vote Rating
    0
    matt_m is on a distinguished road

      0  

    Default Failed loading 'sdk/src/data/ArrayStore.js

    Failed loading 'sdk/src/data/ArrayStore.js


    The titled error occurs when loading a large json-endoded data set. I have a store that loads the data basically inline:

    Code:
    var data = [
    { json-encoded data } ....
    ];
    
    
    Ext.define('MyApp.store.Categories', {
        extend: 'Ext.data.Store',
        config: {
            storeId: 'categoriesStore',
            model: 'MyApp.model.Category',
            data: data
        }
    });
    This works fine, unless the data set becomes large, at which point the error message,
    "Uncaught Error: [Ext.Loader] Failed loading 'sdk/src/data/ArrayStore.js', please verify that the file exists at file:///android_asset/www/sdk/sencha-touch.js:8017"
    occurs when the app starts.

    For me, this occurs at about 500 rows of data. If I cut down that data set and make it smaller, the error does not occur, and everything works fine.

    I am porting this app over from ST1.x. In ST1.x, this same data set did not cause any errors.

    The error is not catastrophic. The app will run, and the Store will actually work fine - the data does load. However, the user can see something went wrong during initialization because the pictos for some buttons won't load after this error occurs. For example, the ui:back & ui:next buttons will not have arrows, and the icons for tabs will load as squares. But other than that, the app seems to run fine - again, even using that data store containing 500+ rows.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Vote Rating
    846
    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


    Are you running the app on a web server or from the file system?

    There should be no reason why the number of rows loaded would try and load ArrayStore.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    16
    Vote Rating
    0
    matt_m is on a distinguished road

      0  

    Default


    Neither. I am testing the code on an Android device. I haven't yet got to running/testing the app on an iOS device yet, but can if that would be helpful.

    Are you saying that defining the Store as shown wouldn't load ArrayStore? If not, what types of components/configurations would? Perhaps there is some other code that is causing the error somehow?

    I can cutdown the json data to determine the exact number of rows at which the error starts to appear. But don't know if that would helpful.

    Matt

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Vote Rating
    846
    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


    StoreManager has ArrayStore in it's uses property and that's the only class in Sencha Touch that would include the ArrayStore.

    The number of rows returned by your server shouldn't try to load ArrayStore. This would be odd behavior if the number of results forces this.

    If you are assigning the store config in a list as an array, then it will create an ArrayStore out of that but it doesn't sound like that is what you are doing. Does this happen when you test in Chrome or Safari?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    16
    Vote Rating
    0
    matt_m is on a distinguished road

      0  

    Default


    Just did some testing.

    I don't see the error occurring in Chrome.
    I don't see the error occurring on an iPhone.

    I tried a different Android device - and I do see the same error. And on both Android phones, the error occurs when there are 275 rows. 274 rows, no error. Though I don't know if it is related to the number of records being created, or just the size of data set.

  6. #6
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    We're probably going to need to look at your specific app. Is there a link you can provide or send me in a PM?

    Sencha Inc

    Jamie Avins

    @jamieavins

  7. #7
    Sencha User
    Join Date
    Mar 2012
    Posts
    16
    Vote Rating
    0
    matt_m is on a distinguished road

      0  

    Default


    No public server to try it on, so it would have to be pm.

Thread Participants: 2

Tags for this Thread