PDA

View Full Version : Error building production package



bradphelan@xtargets.com
16 Apr 2012, 11:44 AM
I have run the following command



✗ sencha app build -v -e production


from my project directory and got the following output and error



[INFO] Deploying your application to /Users/bradphelan/workspace/forminator/build/production

[INFO] Copied sdk/sencha-touch.js

[INFO] Copied app.js

[INFO] Copied resources/css/app.css

[INFO] Copied resources/images

[INFO] Copied resources/icons

[INFO] Copied resources/loading

[INFO] Resolving your application dependencies...

[ERROR] Error thown from your application with message: TypeError: 'undefined' is not an object


However my app runs in debug mode with no problems and I can click through the entire app. The error message is not very helpful as it doesn't give me any indication where the error occured. Any pointers on where to start looking for problems would be appreciated.

bradphelan@xtargets.com
16 Apr 2012, 11:48 AM
I have a store defined as



Ext.define 'app.model.SampleForms'

extend: 'Ext.data.Store'




requires: [

'app.model.FormDefinition'

'Ext.data.Store'

]




config:

model: 'app.model.FormDefinition'

autoLoad: true

proxy:

type: 'ajax'

url: "/forms.json"

if I remove the line 'autoLoad: true' ( which breaks my application, then I can do the build which completes as


[INFO] Deploying your application to <snip>

[INFO] Copied sdk/sencha-touch.js

[INFO] Copied app.js

[INFO] Copied resources/css/app.css

[INFO] Copied resources/images

[INFO] Copied resources/icons

[INFO] Copied resources/loading

[INFO] Resolving your application dependencies...

[INFO] Found 202 dependencies. Concatenating all into app.js...

[INFO] Processed sdk/sencha-touch.js

[INFO] Minifying sdk/sencha-touch.js

[INFO] Processed app.js

[INFO] Minifying app.js

[INFO] Minifying resources/css/app.css

[INFO] Minified sdk/sencha-touch.js

[INFO] Minified app.js

[INFO] Generated delta for: 'app.js' from hash: '2e4deea7b8c9d08f464ae787f665279f560fe74f' to hash: '64d5b2d432ea4c3b36b74a829b2eb68351fe65ec'

[INFO] Minified resources/css/app.css

[INFO] Generated app.json

[INFO] Embedded microloader into index.html

[INFO] Generating checksum for appCache item: index.html

[INFO] Generated cache.manifest

bradphelan@xtargets.com
16 Apr 2012, 11:56 AM
http://www.sencha.com/forum/showthread.php?188357-Problem-when-building-package-with-store-autoloading&langid=14

Tchinkatchuk
25 Apr 2012, 6:45 AM
I had the same and this came from this :

listeners : {
beforeload: function()
{
if ( ! navigator.onLine ) {
alert(app.util.config.messages.navigatorOnlineAlert);
}
},

load: function (store, recs, success)
{
if ( recs.length > 0 ) {
logger(' --- STORE ClassificationsTreeStore loaded ---');
}else{
logger(' --- STORE ClassificationsTreeStore --> NO RECORDS !!! ---');
alert(app.util.config.messages.navigatorOnlineAlert);
}
}
} on my store.
the alert cause the issue on packaging