Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15969

Code Analyzer: error analyzing the Alloy TODO sample app

    Details

    • Story Points:
      8

      Description

      Problem description

      An exception is thrown when analyzing the 'TODO' Alloy test app enabling the 'Process Unvisited Code' from the Preferences.
      Attaching the sample app.

      1. Import the sample in Studio (Sample app attached here)
      2. Open the Code Analyzer preferences and enable all the Settings, including the 'Process Unvisited Code' one.
      2. Run the Code Analyzer (either for Android or iOS)

      Following error is displayed:

      Internal error Cannot read property 'length' of undefined. Please file a bug report at http://jira.appcelerator.org/
      

      Note

      Not been able to reproduce the issue with Field Service app or with a default Alloy new template.

      Additional log

      Additional log running the Code Analyzer from terminal:

      fcasaliMBP:Harness fcasali$ "/usr/local/bin/titanium" "--no-colors" "--no-progress-bars" "--no-prompt" "--no-banner" "analyze" "-o" "stream" "-F" "/Users/fcasali/Documents/Appcelerator_Studio_Workspace/.metadata/.plugins/com.appcelerator.titanium.codeprocessor.core/analyzer2267625029108540994.options"
      Internal error Cannot read property 'length' of undefined. Please file a bug report at http://jira.appcelerator.org/
      fcasaliMBP:Harness fcasali$ "/usr/local/bin/titanium" "--no-colors" "--no-progress-bars" "--no-prompt" "--no-banner" "analyze" "-F" "/Users/fcasali/Documents/Appcelerator_Studio_Workspace/.metadata/.plugins/com.appcelerator.titanium.codeprocessor.core/analyzer2267625029108540994.options"
      [INFO]  Found Titanium plugin id=ti.alloy version=1.0 
      [INFO]  Found Alloy app in /Users/fcasali/development/alloy/test/projects/Harness/app
      [INFO]  Executing Alloy compile: /usr/local/bin/node /usr/local/bin/alloy compile /Users/fcasali/development/alloy/test/projects/Harness/app --config platform=ios,version=0,simtype=none,devicefamily=none,deploytype=development
      [INFO]  ----- MVC GENERATION -----
      [INFO]  [global style] loading from cache...
      [INFO]  [models/todo.js] model processing...
      [INFO]  Found 1 migrations for model: todo
      [INFO]  [add.xml] view processing...
      [INFO]    style:      "add.tss"
      [INFO]    view:       "add.xml"
      [INFO]    controller: "add.js"
      [INFO]    created:    "Resources/iphone/alloy/controllers/add.js"
      [INFO]    created:     "Resources/iphone/alloy/styles/add.js"
      [INFO]  [index.xml] view processing...
      [INFO]    style:      "index.tss"
      [INFO]    view:       "index.xml"
      [INFO]    controller: "index.js"
      [INFO]    created:    "Resources/iphone/alloy/controllers/index.js"
      [INFO]    created:     "Resources/iphone/alloy/styles/index.js"
      [INFO]  [row.xml] view processing...
      [INFO]    style:      "row.tss"
      [INFO]    view:       "row.xml"
      [INFO]    controller: "row.js"
      [INFO]    created:    "Resources/iphone/alloy/controllers/row.js"
      [INFO]    created:     "Resources/iphone/alloy/styles/row.js"
      [INFO]   
      [INFO]  [app.js] using cached app.js...
      [INFO]   
      [INFO]  ----- OPTIMIZING -----
      [INFO]  - alloy/moment.js
      [INFO]  - alloy/moment/lang/en-ca.js
      [INFO]  - alloy/moment/lang/en-gb.js
      [INFO]  - alloy/moment/lang/es.js
      [INFO]  - iphone/ConsoleReporter.js
      [INFO]  - iphone/alloy.js
      [INFO]  - iphone/colors.js
      [INFO]  - iphone/jasmine.js
      [INFO]  - iphone/runtimeTester.js
      [INFO]  - iphone/alloy/models/Todo.js
      [INFO]  - iphone/alloy/sync/localStorage.js
      [INFO]  - iphone/alloy/sync/properties.js
      [INFO]  - iphone/alloy/sync/sql.js
      [INFO]   
      [INFO]  Alloy compiled in 1.24s
      [INFO]  Alloy compiler completed successfully
      [INFO]  Initializing core engine
      [INFO]  Analyzing project
      [INFO]  Processing queued functions
      [INFO]  Processing unvisited code
      [ERROR] TypeError: undefined value has no property "union"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:23:85
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/constants.js:119:26
      [ERROR] TypeError: undefined value has no property "extend"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/app.js:1:12
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:70:8
      [ERROR] TypeError: __defineGetter__ is not a function
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/colors.js:77:4
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [ERROR] uncaughtException: Alloy.UI.create() failed: No API name was given in the second parameter
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:136:8
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [ERROR] TypeError: isArguments is not a function
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/underscore.js:955:7
      [ERROR] TypeError: undefined value has no property "each"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/constants.js:13:2
      [ERROR] TypeError: undefined value has no property "keys"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/constants.js:13:9
      [ERROR] TypeError: undefined value has no property "isFunction"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:96:11
      [ERROR] TypeError: undefined value has no property "isFunction"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:99:4
      [ERROR] TypeError: undefined value has no property "isFunction"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:100:11
      [ERROR] TypeError: undefined value has no property "isFunction"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:121:4
      [ERROR] TypeError: undefined value has no property "isFunction"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:122:11
      [ERROR] TypeError: undefined value has no property "isArray"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:149:14
      [ERROR] TypeError: undefined value has no property "isString"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:149:64
      [ERROR] TypeError: undefined value has no property "isObject"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:153:31
      [ERROR] TypeError: undefined value has no property "contains"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:160:79
      [ERROR] TypeError: undefined value has no property "isString"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:186:14
      [ERROR] TypeError: undefined value has no property "union"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:187:21
      [ERROR] TypeError: undefined value has no property "isString"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:209:14
      [ERROR] TypeError: undefined value has no property "difference"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:210:21
      [ERROR] TypeError: undefined value has no property "isString"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:223:14
      [ERROR] TypeError: undefined value has no property "isObject"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:228:55
      [ERROR] TypeError: undefined value has no property "isString"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:228:76
      [ERROR] uncaughtException: unimplemented method
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy.js:136:8
      [ERROR] TypeError: reset is not a function
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:171:4
      [ERROR] uncaughtException: createSpyObj requires a non-empty array of method names to create spies for
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:180:4
      [ERROR] uncaughtException: This browser does not support XMLHttpRequest.
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:273:4
      [ERROR] uncaughtException: Version not set
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:273:4
      [ERROR] uncaughtException: Attempted to put a value to a non-reference
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:355:11
      [ERROR] uncaughtException: Attempted to put a value to a non-reference
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:359:11
      [ERROR] uncaughtException: jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:359:11
      [ERROR] uncaughtException: As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:359:11
      [ERROR] uncaughtException: <unknown>
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:694:4
      [ERROR] uncaughtException: <unknown>
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:705:4
      [ERROR] uncaughtException: <unknown>
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:714:4
      [ERROR] uncaughtException: <unknown>
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:725:4
      [ERROR] uncaughtException: Actual is not a function
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:759:4
      [ERROR] uncaughtException: Mock clock is not installed, use jasmine.Clock.useMock()
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:913:8
      [ERROR] uncaughtException: Attempted to put a value to a non-reference
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:988:8
      [ERROR] uncaughtException: jasmine.PrettyPrinter: format() nested too deeply!
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:1003:4
      [ERROR] uncaughtException: Attempted to put a value to a non-reference
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:1091:4
      [ERROR] uncaughtException: jasmine.Env() required
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:1208:4
      [ERROR] uncaughtException: explodes function should not have been called
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:1208:4
      [ERROR] uncaughtException: <unknown>
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:1354:4
      [ERROR] uncaughtException: validateUiComponent exception: No id given
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/runtimeTester.js:54:4
      [ERROR] uncaughtException: unimplemented method
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/runtimeTester.js:54:4
      [ERROR] ReferenceError: "todo" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/controllers/index.js:174:21
      [ERROR] TypeError: null value has no property "__transform"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/controllers/row.js:47:36
      [ERROR] TypeError: null value has no property "__transform"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/controllers/row.js:47:65
      [ERROR] uncaughtException: localStorage persistence supported only with MobileWeb and Tizen.
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:1354:4
      [ERROR] ReferenceError: "localStorage" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/sync/localStorage.js:30:20
      [INFO]  program output [warn]: Both "query" and "id" options were specified for model.fetch(). "id" will be ignored.
      [INFO]  program output [debug]: <Unknown value>
      [INFO]  program output [debug]: <Unknown value>
      [ERROR] uncaughtException: <unknown>
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/sync/sql.js:280:8
      [INFO]  program output [info]: <Unknown value>
      [INFO]  program output [info]: <Unknown value>
      [WARN]  requireUnresolved: A value that could not be evaluated was passed to require
      [ERROR] TypeError: undefined value has no property "_abbr"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/alloy/moment.js:662:25
      [INFO]  program output [info]: <Unknown value>
      [INFO]  program output [log]: <Unknown value>
      [INFO]  program output [warn]: <Unknown value>
      [INFO]  program output [warn]: <Unknown value>
      [INFO]  program output [warn]: <Unknown value>
      [INFO]  program output [warn]: <Unknown value>
      [ERROR] TypeError: Attempted to call non-callable value
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/underscore.js:582:55
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/underscore.js:582:55
      [ERROR] uncaughtException: Invalid object
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/underscore.js:730:4
      [ERROR] TypeError: isString is not a function
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/underscore.js:925:26
      [ERROR] TypeError: isNumber is not a function
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/underscore.js:975:11
      [ERROR] uncaughtException: Can't add an invalid model to a collection
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:595:75
      [ERROR] uncaughtException: Cannot sort a set without a comparator
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:719:6
      [ERROR] ReferenceError: "window" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:972:59
      [ERROR] ReferenceError: "window" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:982:21
      [ERROR] ReferenceError: "window" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:983:23
      [ERROR] uncaughtException: Backbone.history has already been started
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:996:6
      [ERROR] ReferenceError: "window" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:1053:6
      [ERROR] ReferenceError: "window" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:1105:8
      [ERROR] ReferenceError: "document" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:1105:75
      [ERROR] ReferenceError: "window" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:1111:25
      [ERROR] ReferenceError: "window" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:1122:8
      [ERROR] ReferenceError: "document" is not defined
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:1193:15
      [ERROR] uncaughtException: <unknown>
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:1230:8
      [ERROR] uncaughtException: A "url" property or function must be specified
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/alloy/backbone.js:1230:8
      [INFO]  program output [warn]: <Unknown value>
      [INFO]  program output [warn]: <Unknown value>
      [INFO]  program output [warn]: <Unknown value>
      [INFO]  program output [warn]: <Unknown value>
      [ERROR] TypeError: undefined value has no property "object"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:160:8
      [ERROR] TypeError: undefined value has no property "args"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:161:8
      [ERROR] TypeError: undefined value has no property "push"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:162:8
      [ERROR] TypeError: undefined value has no property "push"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:163:8
      [ERROR] TypeError: undefined value has no property "apply"
          at /Users/fcasali/development/alloy/test/projects/Harness/Resources/android/jasmine.js:167:15
      Internal error Cannot read property 'length' of undefined. Please file a bug report at http://jira.appcelerator.org/
      fcasaliMBP:Harness fcasali$ 
      
      

        Attachments

          Activity

            People

            • Assignee:
              pinnamuri Praveen Innamuri (Inactive)
              Reporter:
              fcasali Federico Casali
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-18041
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration