PDA

View Full Version : [INFOREQ] SDK Build fails when setTimeout.apply( ) is included in file



nguerin
3 Nov 2012, 5:31 PM
SDK version tested:


2.0.1.1



Description:


The build command fails when setTimeout.apply( ) is used. It is the only variable.



Steps to reproduce the problem:


Take the attached zip project (a slightly modified touch tweets example) and open the first zip--touchtweets-working.zip
Run the command: sencha app build --environment testing from the terminal in the root of the unzipped directory
Unzip the touchtweets-notworking zip and do the same, it doesn't build.



The result that was expected:


they should both build. The only thing that has changed in the two directories is line 29 of Cortana Local Store has been uncommented in the notworking example



The result that occurs instead:


the example with the setTimeout.apply function call fails with this stack trace





STACK TRACE OF ERROR


TypeError: Type error
Stack trace:
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/app/proxy/CortanaLocalStore.js?_dc=1351992129336 : 29 : Twitter.proxy.CortanaLocalStore#read
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/data/Store.js?_dc=1351992129349 : 1680 : Ext.data.Store#load
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/app/controller/Search.js?_dc=1351992129350 : 70 : Twitter.controller.Search#onSearchSelect
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 4521 : Ext.Base#callParent
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/app/controller/tablet/Search.js?_dc=1351992129348 : 37 : Twitter.controller.tablet.Search#onSearchSelect
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/event/Controller.js?_dc=1351992129219 : 197 : Ext.event.Controller#doFire
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/event/Controller.js?_dc=1351992129219 : 124 : Ext.event.Controller#fire
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/event/Dispatcher.js?_dc=1351992129217 : 341 : Ext.event.Dispatcher#doDispatchEvent
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/event/publisher/ComponentDelegation.js?_dc=1351992129239 : 168 : Ext.event.publisher.ComponentDelegation#dispatch
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/event/publisher/ComponentDelegation.js?_dc=1351992129239 : 242 : Ext.event.publisher.ComponentDelegation#publish
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/event/Controller.js?_dc=1351992129219 : 197 : Ext.event.Controller#doFire
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/event/Controller.js?_dc=1351992129219 : 124 : Ext.event.Controller#fire
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/event/Dispatcher.js?_dc=1351992129217 : 341 : Ext.event.Dispatcher#doDispatchEvent
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/event/Dispatcher.js?_dc=1351992129217 : 322 : Ext.event.Dispatcher#dispatchEvent
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/mixin/Observable.js?_dc=1351992129248 : 235 : Ext.mixin.Observable#doFireEvent
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/mixin/Observable.js?_dc=1351992129248 : 224 : Ext.mixin.Observable#fireAction
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/dataview/DataView.js?_dc=1351992129371 : 655 : Ext.dataview.DataView#onItemSelect
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/mixin/Selectable.js?_dc=1351992129381 : 267 : Ext.mixin.Selectable#doSingleSelect
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/mixin/Selectable.js?_dc=1351992129381 : 237 : Ext.mixin.Selectable#select
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/app/controller/Search.js?_dc=1351992129350 : 197 : Twitter.controller.Search#doSearch
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/app/controller/Search.js?_dc=1351992129350 : 57 : Twitter.controller.Search#onSearchesStoreLoad
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 4521 : Ext.Base#callParent
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/app/controller/tablet/Search.js?_dc=1351992129348 : 10 : Twitter.controller.tablet.Search#onSearchesStoreLoad
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 9608 : Anonymous
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/data/Store.js?_dc=1351992129349 : 1909 : Ext.data.Store#onProxyLoad
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/data/proxy/WebStorage.js?_dc=1351992129419 : 119 : Ext.data.proxy.WebStorage#read
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/data/Store.js?_dc=1351992129349 : 1680 : Ext.data.Store#load
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/app/controller/Search.js?_dc=1351992129350 : 42 : Twitter.controller.Search#launch
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/app/Application.js?_dc=1351992129327 : 609 : Ext.app.Application#onDependenciesLoaded
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 7790 : Anonymous
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 3195 : Anonymous
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/src/app/Application.js?_dc=1351992129327 : 567 : Ext.app.Application#loadControllerDependencies
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 7539 : Anonymous
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 7540 : Anonymous
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 7540 : Anonymous
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 7540 : Anonymous
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 7863 : Anonymous
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 3181 : Anonymous
file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/sencha-touch-debug.js : 7558 : Anonymous
[ERROR] Failed loading your application from: 'file:////Users/nguerin/Code/libraries/sencha-touch-2.0.1.1/examples/touchtweets/index.html'. Try setting the absolute URL to your application for the 'url' item inside 'app.json'




Screenshot or Video:


touchtweets-working.zip
touchtweets-notworking.zip





Debugging already done:


none, don't know how to debug the SDK



Possible fix:


not provided



Additional CSS used:


none



Operating System:


OSX 10.8.2

mitchellsimoens
4 Nov 2012, 4:52 AM
Have you tried with 2.1.0 RC2 and the new Sencha Cmd?

nguerin
4 Nov 2012, 11:13 AM
Thanks for the reply.

No, I haven't. Is 2.1 publicly released yet?

Anyway, I figured out what the problem was. I was calling setTimeout.apply(this, [args]), essentially passing in a different "this" to setTimeout, which isn't allowed.