1. #1
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    224
    Answers
    24
    Vote Rating
    7
    u25771 is on a distinguished road

      1  

    Default Unanswered: Error on startup -- Ext.device.Communicator

    Unanswered: Error on startup -- Ext.device.Communicator


    Hey guys,

    My app get the following error on startup:
    Code:
    [Error] TypeError: 'Ext.device.communicator.Default' is not a valid argument for 'Function.prototype.apply' (evaluating 'r.push.apply(r,l)')    triggerCreated (app.js, line 1)
        d (app.js, line 1)
    Any idea how to resolve this error?
    Mark thread as answered if your problem could be solved and leave a vote for helpful answers

    For more help check out my new blog: http://abitofcoding.blogspot.com

    T
    o get in contact with me just send me a message on Google+

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,936
    Answers
    328
    Vote Rating
    130
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    What debugging have you done? What line is your code is causing that error?
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

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

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

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    224
    Answers
    24
    Vote Rating
    7
    u25771 is on a distinguished road

      0  

    Default


    Quote Originally Posted by fmoseley View Post
    What debugging have you done? What line is your code is causing that error?

    The error is thrown at this point:

    Code:
    var Ext = Ext || {};
    Mark thread as answered if your problem could be solved and leave a vote for helpful answers

    For more help check out my new blog: http://abitofcoding.blogspot.com

    T
    o get in contact with me just send me a message on Google+

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    224
    Answers
    24
    Vote Rating
    7
    u25771 is on a distinguished road

      0  

    Default


    Quote Originally Posted by fmoseley View Post
    What debugging have you done? What line is your code is causing that error?
    Sorry, did a mistake. Here's there error thrown:

    Code:
    triggerCreated: function(q) {
                var s = this.createdListeners, k = this.nameCreatedListeners, l = this.maps.nameToAlternates[q], r = [q], n, p, m, o, h, g;
                for (n = 0, p = s.length; n < p; n++) {
                    h = s[n];
                    h.fn.call(h.scope, q)
                }
                if (l) {
                    r.push.apply(r, l)  // <---------------------- HERE 
                }
                for (n = 0, p = r.length; n < p; n++) {
                    g = r[n];
                    s = k[g];
                    if (s) {
                        for (m = 0, o = s.length; m < o; m++) {
                            h = s[m];
                            h.fn.call(h.scope, g)
                        }
                        delete k[g]
                    }
                }
            },
    Mark thread as answered if your problem could be solved and leave a vote for helpful answers

    For more help check out my new blog: http://abitofcoding.blogspot.com

    T
    o get in contact with me just send me a message on Google+

  5. #5
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    224
    Answers
    24
    Vote Rating
    7
    u25771 is on a distinguished road

      0  

    Default


    Quote Originally Posted by fmoseley View Post
    What debugging have you done? What line is your code is causing that error?
    Another update It seems the error is only thrown on a production build. When I build a testing version also with cordova, there is no error...


    Working:
    Code:
    sencha app build testing
    Not working:
    Code:
    sencha app build prodution
    Code:
    sencha app build native
    Mark thread as answered if your problem could be solved and leave a vote for helpful answers

    For more help check out my new blog: http://abitofcoding.blogspot.com

    T
    o get in contact with me just send me a message on Google+

  6. #6
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,936
    Answers
    328
    Vote Rating
    130
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    Thanks for the additional info. What version of Cmd are you using? If you are using 5 you may want to update to the latest Cmd 5.0.2. I know there were production build issues with earlier versions of Cmd.
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

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

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

    Need to include a test case use:
    The official Sencha Fiddle

  7. #7
    Sencha User
    Join Date
    Dec 2013
    Posts
    5
    Vote Rating
    0
    gapa is on a distinguished road

      0  

    Default


    I receive same error. I am using cmd 5.0.2 beta. I started to develop my app with touch 2.3.1 and cmd 4.0.5 and later upgraded to touch 2.4 and cmd 5.0.2
    I had to change app.json to match new build directives for cordova. I did this based on defaults from “.sencha/app/app.defaults.json” and not on http://docs.sencha.com/cmd/5.x/cordova_phonegap.html. If I tried this I received error with "sencha app build ios"

    Code:
    "ios": {
             "packager": "cordova",
             "cordova": {
                "config": {
                    "platforms": "ios",
                    "name": "AppName",
                       "id": "com.mydomain.AppName"
                }
             }
          }

  8. #8
    Sencha User
    Join Date
    Dec 2013
    Posts
    5
    Vote Rating
    0
    gapa is on a distinguished road

      0  

    Default


    I also received this error. I am using cmd 5.0.2. I started developing app in touch 2.3.1. and cmd 4. Later I upgraded to touch 2.4 and cmd 5.0.2. I had to change app.json to use new way of cordova build. I followed guildline from “.sencha/app/app.defaults.json”. and not from http://docs.sencha.com/cmd/5.x/cordova_phonegap.html. If I did that I received another error.my app.json section for cordova: "ios": { "packager": "cordova", "cordova": { "config": { "platforms": "android", "name": "myapp", "id": "com.mydomain.myapp" } } }

  9. #9
    Sencha User
    Join Date
    Feb 2014
    Posts
    1
    Vote Rating
    0
    hunteri is on a distinguished road

      0  

    Default


    Hi all,

    Does anyone have a workaround for this? I'm experiencing the same issue, below is what I did:

    1. Had an existing touch 2.3, cmd 4.something project with Architect 3.0
    2. Downloaded Architect 3.1, loaded in old project and had it go through that automated upgrade process
    3. Modified the app.json to add the new "native" block to work with cmd 5.0 and phonegap
    4. Running Native Build & Emulate runs without error and opens iOS simulator, but the same error during startup is given

    Am I missing a piece of the process? Never upgraded Architect before and am fairly new to Sencha.

    Thanks!

  10. #10
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    224
    Answers
    24
    Vote Rating
    7
    u25771 is on a distinguished road

      0  

    Default


    Error still occured, any updates or solution?
    Mark thread as answered if your problem could be solved and leave a vote for helpful answers

    For more help check out my new blog: http://abitofcoding.blogspot.com

    T
    o get in contact with me just send me a message on Google+

Thread Participants: 3