Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Unexpected error on running production app

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    103
    Answers
    5

    Default Unexpected error on running production app

    When I run my app on my browser, I got the following error and nothing is displayed (except the microloader):

    • Error evaluating http://mydomain/mobile/app.js with message: SyntaxError: Unexpected token :
      • G /mobile/:139
      • c /mobile/:140
      • b /mobile/:140
      • D /mobile/:143
      • w /mobile/:143
      • D /mobile/:144
    Document was loaded from Application Cache with manifest http://mydomain/mobile/cache.manifest
    Application Cache Checking event
    Application Cache NoUpdate event
    I have no ideas of what's going on. I've used the latest Sencha SDK Tools and the command "sencha app build production" with Sencha Touch 2.0.1 commercial.

    Thanks,
    Pepperseb

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,392
    Answers
    3997

    Default

    Is there any syntax errors in app.js?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    103
    Answers
    5

    Default

    No, but I've noticed that the error shows up only when using Chrome (no errors with iOS and Android)

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    103
    Answers
    5

    Default

    Ok I've got some new information.

    When I'm using a testing app, there's no error. Moreover, I had this bit of code in my app.js:

    Code:
    onUpdated: function() {
            /*
               'onUpdated' is triggered after the following cases happen:
                - Your application's HTML 5 manifest file (cache.manifest) changes. 
                - You have changes in any of your JavaScript or CSS assets listed in
                the "js" and "css" config inside app.json. 
            */
            Ext.Msg.confirm(
                "Update",
                "Reload now?",
                function() {
                    window.location.reload();
                }
            );
    The app actually shows the above error message when hitting the Yes button.

    I'm quite sure that the error is caused by the cache.manifest.

  5. #5
    Sencha User
    Join Date
    Dec 2010
    Posts
    34

    Default Also found this problem, have you found the reason?


  6. #6
    Sencha User
    Join Date
    Apr 2012
    Posts
    103
    Answers
    5

    Default

    Quote Originally Posted by lincon6 View Post
    No.

    I use "sencha app build package" instead... Or you can still use "sencha app build package" and try to remove the onUpdated function ?

  7. #7
    Sencha User
    Join Date
    Oct 2012
    Posts
    15
    Answers
    1

    Default Reproduce the same error with Sencha Touch 2.1 and Sencha Cmd v3.0.0.250

    From what I read it happens to many developers. I'm still trying to locate the problem. It comforts me that you hear from iOS and Android will not play. Let's see if we can find why it happens in Chrome.

  8. #8
    Sencha User
    Join Date
    Oct 2012
    Posts
    15
    Answers
    1

    Default Script Index Caching

    Hi guys,

    I noticed that the error is in the script that is included in the "index.html", to create the production build, after HTMLComment:

    HTML Code:
    <!-- The line below must be kept intact for Sencha Command to build your application -->
    And replacing the script development version:

    HTML Code:
    <script type="text/javascript" id="microloader" src="touch/microloader/development.js"> </ script>
    By using an Online JavaScript Beautifier for debugging the code, I realized that as much as change the "index.html" the production build, to run the app from the browser uses the cache.

    When I "Delete cookies and other site and plug-in data" then the app itself is updated without problems.

    I will continue investigating the problem, but do not know if I will be able to know how to see the error.

    Regards,

  9. #9

  10. #10

    Default same situation here

    I'm using Sencha Touch 2.1.1 (Commercial), and having exactly the same problem.

    Right after the first update confirmation I get:

    ".../production/app.js with message: SyntaxError: Unexpected token ILLEGAL" error

    and the page stops loading.

    Any progress so far?

Page 1 of 2 12 LastLast

Posting Permissions

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