Search code examples
javascriptextjssencha-touchsencha-cmd

Sencha build error when viewed in browser


I have finally managed to create a production build of my sencha web app using Cmd 3.10.2.342 and touch 2.2.1

All my bespoke files are included and deltas are created as one would expect. However, when I run it in the browser, it stalls at the loading view. Console log says:

TypeError: 'undefined' is not a function (evaluating 'h.call(w,w)')

I have traced the error to Ext.application({... in app.js.
I have tried the following changes, but still get errors:

  1. new Ext.application({...
  2. Ext.Application({...
  3. new Ext.Application({...

How can I rectify this?

When I generate an apk file, I do not have this problem

In my production app.js, I found this
if(!s){a.set(i,w);if(h){h.call(w,w)}a.triggerCreated(i);return}

I don't really know what it does. I have tried deleting it etc, but it just the gives other errors instead


Solution

  • I traced this back to issues/conflicts with itemId and id where sencha was telling me that a component already existed and should be destroyed.

    Solved it by removing id and itemId and used cls instead