1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    44
    Vote Rating
    0
    jachenry is on a distinguished road

      0  

    Default Unanswered: Production Microloader - [ERROR] TypeError: 'undefined' is not a function

    Unanswered: Production Microloader - [ERROR] TypeError: 'undefined' is not a function


    I can't get my app to compile using the production microloader.

    Code:
    [INFO] Resolving your application dependencies (file:////.../index.html)
    [ERROR] TypeError: 'undefined' is not a function
    
    
      phantomjs://webpage.evaluate():7
      phantomjs://webpage.evaluate():1
      ...sdk/command/vendor/phantomjs/dependencies.js:36
    Timeout waiting for the application to finish loading

  2. #2
    Sencha Premium Member Martin1982's Avatar
    Join Date
    Aug 2011
    Location
    The Netherlands
    Posts
    109
    Vote Rating
    0
    Answers
    4
    Martin1982 is on a distinguished road

      0  

    Default


    This is a nasty thing I've ran into a couple of times, here's your checklist:
    1. Check if the application doesn't put any warnings in your Javascript console, if there are warnings resolve these first by setting up the 'requires'
    2. Check if every file used is loaded through your app.js and controllers (Models, views, controllers, etc)
    3. If you're using profiles check that the files used are also present in the profile file
    Try to rebuild now and you should get a working package, if not it's going to be hardcore debugging time to see which component breaks your build.
    Allround web developer, conference organiser and speaker.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    44
    Vote Rating
    0
    jachenry is on a distinguished road

      0  

    Default


    The error is because Ext.onReady is 'undefined'. Anyone know why it would be undefined?

    .../sdk/command/vendor/phantomjs/dependencies.js:36


    Code:
    page.open(uri, function(status) {
        if (status !== 'success') {
            error("Failed openning: '" + uri + "', please verify that the URI is valid");
        }
    
    
        page.evaluate(function() {
            if (typeof Ext == 'undefined') {
                throw new Error('Ext is not defined, please verify that the application URL is correct');
                return;
            }
    
    
            Ext.onReady(function() {
                var documentLocation = document.location,
                    currentLocation = documentLocation.origin + documentLocation.pathname + documentLocation.search,
                    dependencies = [],
                    path;

  4. #4
    Sencha Premium Member Martin1982's Avatar
    Join Date
    Aug 2011
    Location
    The Netherlands
    Posts
    109
    Vote Rating
    0
    Answers
    4
    Martin1982 is on a distinguished road

      0  

    Default


    That usually happens when a fatal error occurs within the Javascript. Is your console showing any errors?
    Allround web developer, conference organiser and speaker.

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    44
    Vote Rating
    0
    jachenry is on a distinguished road

      0  

    Default


    There are no errors in the console when I run with the development microloader. I get a white screen if I try to use the production microloader in the browser.

  6. #6
    Sencha User
    Join Date
    Jun 2012
    Posts
    2
    Vote Rating
    0
    rfdigital is on a distinguished road

      0  

    Default


    experiencing exact same issue.

    Apparently some "various cleanup on some files" worked for someone in this thread, but no details on what exactly was done:
    http://www.sencha.com/forum/showthre...s-not-working/

  7. #7
    Sencha User
    Join Date
    Jun 2012
    Posts
    9
    Vote Rating
    0
    Answers
    1
    fatangare is on a distinguished road

      0  

    Default Same error in examples too

    Same error in examples too


    When I change development.js to production.js or testing.js in examples provided (e.g. Kitchensink, O'Reilly),
    I get same error. Is it Sencha Touch bug?

  8. #8
    Sencha User
    Join Date
    Jul 2012
    Posts
    1
    Vote Rating
    0
    wissu is on a distinguished road

      0  

    Default Same problem

    Same problem


    with examples oreilly and kitchensink

  9. #9
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    39
    Vote Rating
    0
    shanlin is on a distinguished road

      0  

    Default


    Is there any update to this thread? I ran into the same issue after upgraded to the latest SDK.

  10. #10
    Sencha User
    Join Date
    Jul 2012
    Posts
    1
    Vote Rating
    0
    ppatriotis is on a distinguished road

      0  

    Default Same Issue

    Same Issue


    I'm having the same issue. I even tried generating the sample application and only changed development.js to production.js and that will not work either. Has anyone figured this out?