Hybrid View

  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,034
    Answers
    3493
    Vote Rating
    850
    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,034
    Answers
    3493
    Vote Rating
    850
    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,034
    Answers
    3493
    Vote Rating
    850
    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.