Results 1 to 2 of 2

Thread: "sencha app build production" [Ext.Loader] Failed loading

  1. #1
    Sencha Premium User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    628

    Default "sencha app build production" [Ext.Loader] Failed loading

    The error I am talking about is:
    Code:
    [ERROR] Error thown from your application with message: Error: [Ext.Loader] Failed loading 'sdk/src/data/reader/Array.js', please verify that the file exists
    In dev mode everything works just fine but when you try to compile things, in Sencha Touch 2 projects, with both Windows versions of SDK Tools, command ends like in the upper snippet.

    After many hours I spotted my problem. Maybe yours is the same.

    My application is making use of an authenticatiob api, using Oauth2, so in the early stages, like in application launch, I am checing if the application has an access_token or I have to obtain a new one. That is happening by redirectig the browser to some other url. And this is the point where the sencha sdk tools crash.

    Solution was simple for me, it was enough to delay the eventually redirection some milliseconds, and move it out from launch method.
    Code:
     launch: function() {
            window.FB= this.getController('FB');
            // Destroy the #appLoadingIndicator element
            Ext.fly('appLoadingIndicator').destroy();
            Ext.defer(Ext.bind(this.later,this),200);       
        },
        later:function()
        {
            this.nav = Ext.Viewport.add({xtype:'navigationview'});
    
    
            var params = Ext.Object.fromQueryString(window.location.hash.substr(1));
            if(!params.access_token)
            {
                //init authentication
                FB.authenticate();
            }        
        }
    so better keep the launch method lite and defer the other initialisations otherway the sdk tools might cause you frustrations

  2. #2
    Sencha Premium User dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,224

    Default

    nice pickup!
    Cloud Application Architect

    Sencha Specialist / Sencha MVP / Sencha Technical Trainer
    ExtJs Developer + Contributor since 0.2.2 - Champion of the per developer license.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •