1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    108
    Answers
    4
    Vote Rating
    1
    paulh1971 is on a distinguished road

      0  

    Default Answered: Production build is not working

    Answered: Production build is not working


    Hello everyone. I have a problem that I hope someone can help me with.

    My web app works great when I use 'sencha app build testing', but when I use 'sencha app build production' it does not. When I load it to my server and view it, all I get is a blank white screen. So I took a look at it in Chrome and here is what I found in the console:

    Creating Application Cache with manifest http://(myactualsite)/cache.manifest
    Application Cache Checking event
    Application Cache Downloading event
    Application Cache Progress event (0 of 1) http://(myactualsite)/index.html
    [COLOR=red !important]Failed to load resource [/COLOR]http://(myactualsite)/app.json?1339767731650
    Application Cache Progress event (1 of 1)
    Application Cache Cached event

    I have no idea where it is getting the numbers after app.json.

    So, I noticed that in my index.html that script src was 'sdk/microloader/development.js'. I changed development.js to production.js, but when I try to run the build I get the following errors:

    [ERROR] TypeError: 'undefined' is not a function

    phantom.js://webpage.evaluate():7
    phantom.js://webpage.evaluate():1
    c:\inetpub\wwwroot\(my path)\sdk\command\vendor\phantomjs\dependencies.js:36
    Timeout waiting for the application to finish loading
    [ERROR] Failed loading your application from 'http://localhost/(my path)/index.html

    I have no idea how to resolve this. Any help would be greatly appreciated.

    Thanks,
    Paul

  2. Well, some how I finally got the production build to work. I did some various cleanup on some files and now it works. I wish I knew what made it work so it could help someone else.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,203
    Answers
    3516
    Vote Rating
    856
    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

      0  

    Default


    Are you running it on a webserver? If so is that server IIS? If so do you have a mime type for json files?
    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 Premium Member
    Join Date
    Feb 2012
    Posts
    108
    Answers
    4
    Vote Rating
    1
    paulh1971 is on a distinguished road

      0  

    Default


    Thanks for your reply Mitchell. I am running it on a webserver with IIS, and I do have the mime type for json files. It works pefecty fine with the testing build, just not the production build.

  5. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,203
    Answers
    3516
    Vote Rating
    856
    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

      0  

    Default


    Ok. Any errors in the console? Maybe the logger bug?
    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.

  6. #5
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    108
    Answers
    4
    Vote Rating
    1
    paulh1971 is on a distinguished road

      0  

    Default


    This is the error that I see in the cosole. I am not sure what the logger bug is.

    [ERROR] TypeError: 'undefined' is not a function

    phantom.js://webpage.evaluate():7
    phantom.js://webpage.evaluate():1
    c:\inetpub\wwwroot\(my path)\sdk\command\vendor\phantomjs\dependencies.js:36
    Timeout waiting for the application to finish loading
    [ERROR] Failed loading your application from 'http://localhost/(my path)/index.html

  7. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,203
    Answers
    3516
    Vote Rating
    856
    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

      0  

    Default


    That's not the logger bug. You have a JS error somewhere that you need to find. Are you using the new keyword anywhere?
    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.

  8. #7
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    108
    Answers
    4
    Vote Rating
    1
    paulh1971 is on a distinguished road

      0  

    Default


    Yeah, I knew that wasn't the logger bug; I am not sure what that is.

    I am not using the new keyword; I have read to not use that.

    Is there an easy way to find JS errors?

    Thanks!

  9. #8
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,203
    Answers
    3516
    Vote Rating
    856
    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

      0  

    Default


    I would first try sencha app build testing to see if the error is in there. If there is an error, it's not minified so you can track where the error is happening to debug.

    There is no reason not to use the new keyword. Only thing is you must make sure what you are creating is loaded.
    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.

  10. #9
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    108
    Answers
    4
    Vote Rating
    1
    paulh1971 is on a distinguished road

      0  

    Default


    I will do that tonight and hopefully I will find the error. I will post back here what I find.

    Thanks for your help with this and the other items you have helped me with.

  11. #10
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    108
    Answers
    4
    Vote Rating
    1
    paulh1971 is on a distinguished road

      0  

    Default


    In testing with Google Chrome console I did find a javascript error and I resolved it. I am stilling having the same problems though. I went into app.json and found that it shows a javascript error, but I found this to be the case in the examples too.

    I understand how to see errors in the console, but how do I use the debugger?

    One other question. You should be able to change the microloader to production.js, correct? Anytime I change it from development.js to production.js, all I get is a blank white screen. Does this indicate that there are errors?