1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    22
    Vote Rating
    0
    Answers
    1
    slmckenzie is on a distinguished road

      0  

    Default Answered: ST 2.1.1 Building Putting Files in Wrong Folder? (Now Blank app.js!)

    Answered: ST 2.1.1 Building Putting Files in Wrong Folder? (Now Blank app.js!)


    I've been working with Sencha Touch 2.0 for awhile, and have had a framework set up and functioning during that time. Recently I attempted to upgrade to 2.1.1, to align it with the newest available release, and updated Sencha Cmd to v. 3.0.2.288.

    Everything seemed to be working fine, until I attempted to build a testing build. After doing the build, I noticed it deployed into the following directory:

    Code:
    <application directory>/build/<application name>/testing
    Previously, it had been deployed into:

    Code:
    <application directory>/build/testing
    It now seemed to add an additional subfolder between "build" and "testing". This seems to cause it to quit working, as the app now no longer seems to work. When I load the app using the new location, it simply loads the Sencha Touch loading screen, which never goes away.

    Is the new version of ST 2.1.1 supposed to deploy into that additional nested folder? Or is there something mucked up with my setup?

    Thanks!

    ***UPDATE***

    So, I've done some more playing / testing with this, and I think I'm getting closer to the solution. After doing some digging, it appears that putting the build in the new, deeper subfolder is normal, and is to be expected with the new version of ST / Sencha Cmd.

    However, I've noticed that the app.js file, located in the:

    Code:
    build/<app name>/testing/
    folder is empty! I'm guessing this isn't supposed to be that way... It's just completely blank, even though following through the debug output in Sencha Cmd when typing:

    Code:
    sencha app build testing
    appears to be correct. Any ideas?

    Thanks!

  2. Found it! By, what a pain in the arse though........

    Back in a previous post, I mentioned that upgrading the app to 2.1.1 caused app.js to not add the following block of code to the top of the file:

    Code:
    //<debug>
    Ext.Loader.setPath({
        'Ext': 'touch/source'
    });
    //<debug>
    Whelp - turns out that this was the source of a problem. If you look back at that block of code, you might see something missing....

    Check out the last debug block. It's missing the

    Code:
    /
    needed to close the tag. So, apparently even though this is commented out JS, it's still utilized by the compiler somehow to determine aspects of the compilation process, and causes the app to not copy anything over after it compiles. *sigh* So I simply appended the slash to where it needed to be, rebuilt the app, and BAM! Instant working.

    At least it's working now, but what a PITA to find!

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    Answers
    3564
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    I have not had any issues with Cmd generating app.js and can confirm the extra directory for the name of your app is normal.

    As a test, try generating a default app with ST 2.1.1 and then build it. Does it work? If so then there is something going on within your app, a possible upgrade issue maybe.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    22
    Vote Rating
    0
    Answers
    1
    slmckenzie is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    I have not had any issues with Cmd generating app.js and can confirm the extra directory for the name of your app is normal.

    As a test, try generating a default app with ST 2.1.1 and then build it. Does it work? If so then there is something going on within your app, a possible upgrade issue maybe.
    mitchellsimoens,

    Thank you for that info. I'm glad to know I wasn't going crazy, seeing it building in the additional subfolder!

    I tried your suggestion of generating a new app, and then building in it, and it worked like a champ... So apparently I have something wrong with my current app that's not building properly. Now, I will readily admit that I'm not an expert with Sencha Touch by any means (I'm doing this project as a volunteer side-project, outside of my daily job), so I could easily have screwed something up.

    I believe it was Touch 2.0.1 that I started developing the app with, and then I upgraded it to Touch 2.1.0, and then 2.1.1, using the command:

    Code:
    sencha app upgrade <path/to/sdk>
    from inside of the app's directory. This appeared to work fine, though I noticed it got a few things fubar'd. I don't remember all that got messed up, but one of them was in the base app.js file, where it didn't have the code:

    Code:
    //debug
    Ext.Loader.setPath({
        'Ext': 'touch/src'
    }
    //debug
    I had to add that block in, in order for it to load the page properly. If I recall, I think it also didn't migrate over a number of other folders properly, so I had to attempt to rebuild that structure as well. I've now compared the existing structure to one of a freshly created application, and it *seems* to be the same. Though I'm guessing there might be some minor change in one of the configuration files (or the .sencha folder) that need changed that I'm missing.

    Does that information help at all in attempting to determine what's wrong with my existing app? If I need to I can always move all of my files / folders from my existing app into the new app, but I'm a bit leery of doing that and completely mucking up my SVN repo and having to attempt to straighten that out. I'd rather not do that if I don't have to!

    Thanks!

  5. #4
    Sencha User
    Join Date
    Nov 2012
    Posts
    22
    Vote Rating
    0
    Answers
    1
    slmckenzie is on a distinguished road

      0  

    Default


    I just did quite a bit of testing, and I can't seem to figure out where the heck it's blowing up in the build process! I compared everything that seemed like it would be of relevance between my existing application and my new quick test build. Everything was exactly the same between them! I even put them into a diff, and couldn't see a difference between them either.

    I also ran the a diff on the output generated between the main app, and the output of the quick testing app. They were the same as well....

    Any ideas of where else to look to see if I can figure out what the heck is wrong? Note that there's no spaces in the name of the application, so that shouldn't be breaking anything in the process.

    Thanks!

    **Edit**

    I ran a debug "build testing" for both my main app, and the quick test. I then did a diff on the outputs between the two, and noticed these two lines added on the quick test (which work), and aren't on the main app's output (which doesn't work):

    Code:
    DBG adding implicit dependency for Ext.application call
    DBG Creating virtual class definition QuickTest.app.Application
    If I had a bad app.js, would that possibly cause this? I've verified it matches the QuickTest app.js, except for the addition of all my Views, Stores, etc. If I had bad references / requires listed in various places, could it possibly do what I'm seeing it do?

  6. #5
    Sencha User
    Join Date
    Nov 2012
    Posts
    22
    Vote Rating
    0
    Answers
    1
    slmckenzie is on a distinguished road

      0  

    Default


    Found it! By, what a pain in the arse though........

    Back in a previous post, I mentioned that upgrading the app to 2.1.1 caused app.js to not add the following block of code to the top of the file:

    Code:
    //<debug>
    Ext.Loader.setPath({
        'Ext': 'touch/source'
    });
    //<debug>
    Whelp - turns out that this was the source of a problem. If you look back at that block of code, you might see something missing....

    Check out the last debug block. It's missing the

    Code:
    /
    needed to close the tag. So, apparently even though this is commented out JS, it's still utilized by the compiler somehow to determine aspects of the compilation process, and causes the app to not copy anything over after it compiles. *sigh* So I simply appended the slash to where it needed to be, rebuilt the app, and BAM! Instant working.

    At least it's working now, but what a PITA to find!

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

      0  

    Default


    We have a similar problem. Our app works fine in ST 2.1.0 and Sencha Cmd 3.0.0.250. After upgrading to ST 2.1.1 and Sencha Cmd 3.1.0.216, and running 'sencha app build testing' generates empty/blank app.js. There is no errors and using debug flag doesn't seem to reveal any meaningful clue. So my question is how we can diagnose the problem.

  8. #7
    Sencha User
    Join Date
    Nov 2012
    Posts
    22
    Vote Rating
    0
    Answers
    1
    slmckenzie is on a distinguished road

      0  

    Default


    Quote Originally Posted by shanlin View Post
    We have a similar problem. Our app works fine in ST 2.1.0 and Sencha Cmd 3.0.0.250. After upgrading to ST 2.1.1 and Sencha Cmd 3.1.0.216, and running 'sencha app build testing' generates empty/blank app.js. There is no errors and using debug flag doesn't seem to reveal any meaningful clue. So my question is how we can diagnose the problem.
    Take a look at my posts above. I had to add the "//<debug>" block into the app.js file after upgrading. I then had a typo in it, so it didn't work properly. Once I fixed the typo, all was good!

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

      0  

    Default


    Hi Slmckenzie,

    In my case, the debug block is fine. What command do you build? Do you use 'sencha app build testing' or do you use 'ant build'?

  10. #9
    Sencha User
    Join Date
    Nov 2012
    Posts
    22
    Vote Rating
    0
    Answers
    1
    slmckenzie is on a distinguished road

      0  

    Default


    Quote Originally Posted by shanlin View Post
    Hi Slmckenzie,

    In my case, the debug block is fine. What command do you build? Do you use 'sencha app build testing' or do you use 'ant build'?
    Code:
    sencha app build testing

Thread Participants: 2