-
9 Apr 2012 6:32 AM #1
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:
This works fine, unless the data set becomes large, at which point the error message,Code:var data = [ { json-encoded data } .... ]; Ext.define('MyApp.store.Categories', { extend: 'Ext.data.Store', config: { storeId: 'categoriesStore', model: 'MyApp.model.Category', data: data } });
"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.
-
9 Apr 2012 6:39 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
9 Apr 2012 7:25 AM #3
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
-
9 Apr 2012 7:42 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
9 Apr 2012 8:51 AM #5
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.
-
9 Apr 2012 8:55 AM #6Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
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?
-
9 Apr 2012 9:17 AM #7
No public server to try it on, so it would have to be pm.
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote