Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17604] iOS: CLI: Building for all IOS devices throws "ReferenceError: i is not defined"

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-09-15T19:01:17.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sRelease 3.4.0
ComponentsCLI, iOS
Labelsqe-3.4.0
ReporterLokesh Choudhary
AssigneeChris Barber
Created2014-09-02T22:54:18.000+0000
Updated2014-09-15T19:01:17.000+0000

Description

Description:

1. Build an app for multiple IOS devices at the same time(I did on 2 devices) using the "Run -> On all IOS devices" option in studio. or 1. Build an app for multiple IOS devices at the same time(I did on 2 devices) using the "all" flag for device id in CLI.

Actual result:

1. We get the error below & the build fails:
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185
        throw e;
              ^
ReferenceError: i is not defined
    at iOSBuilder.<anonymous> (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/iphone/cli/commands/_build.js:1112:79)
    at Array.forEach (native)
    at iOSBuilder.validate (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/iphone/cli/commands/_build.js:1110:32)
    at exports.validatePlatformOptions (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/node_modules/titanium-sdk/lib/titanium.js:596:69)
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/cli/commands/build.js:206:19
    at callCommandValidate (/usr/local/lib/node_modules/titanium/lib/cli.js:858:7)
    at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:551:21
    at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:227:13
    at iterate (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:134:13)
    at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:145:25
---------------------------------------------
    at exports.execFile (child_process.js:702:9)
    at exports.exec (child_process.js:589:18)
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/node_modules/node-appc/lib/environ.js:251:3
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/node_modules/node-appc/node_modules/async/lib/async.js:254:17
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/node_modules/node-appc/node_modules/async/lib/async.js:157:25
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/node_modules/node-appc/node_modules/async/lib/async.js:251:21
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/node_modules/node-appc/node_modules/async/lib/async.js:615:34
    at /Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.4.0.v20140829184521/node_modules/node-appc/lib/environ.js:218:7

Expected Result:

1. The app should build successfully on all IOS the devices attached

Comments

  1. Chris Barber 2014-09-03

    Master: https://github.com/appcelerator/titanium_mobile/pull/6013 3_4_X: https://github.com/appcelerator/titanium_mobile/pull/6014
  2. Chris Barber 2014-09-03

    To test, connect an iOS 6.x or 7.x device, then set the min-ios-ver in the tiapp.xml to 8.0 and run a build with \-\-device\-id all.
  3. Tim Poulsen 2014-09-03

    Tested with Xcode 6 Beta 7. With min-ios-ver set to 8.0 with an iOS7.1.2 device, I get the errors/warning messages expected and the app isn't installed. If I remove the min-ios-ver, the app is installed to the device. PRs merged.
  4. Khushbu Agrawal 2014-09-05

  5. Ewan Harris 2014-09-06

    Issue still occurs in both CLI and Studio on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201409021758 Titanium SDK build: 3.4.0.v20140905152516 Titanium CLI, build: 3.4.0-beta Alloy: 1.5.0-beta2 Xcode6-Beta7 iOS Device iPhone 5(8.05b), iPhone 4s(8.05b)
  6. Chris Barber 2014-09-08

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/6031 3_4_X pull request: https://github.com/appcelerator/titanium_mobile/pull/6032 To test, connect an iOS device, then run ti build -p ios -T device --device-id all. It should not error out. Also try specifying a bad iOS device: ti build -p ios -T device --device-id foo
  7. Tim Poulsen 2014-09-08

    Works as described. PRs merged
  8. Khushbu Agrawal 2014-09-09

    When I ran this "ti build -p ios -T device --device-id all" command ,the application built and installed successfully on all the iOS devices. But its giving me the below error message along with it for both CLI as well as the Studio.The below error message should not be shown.
       [TRACE] ** BUILD SUCCEEDED **
       [INFO]  Installing app on device: AppcS iPhone5S
       [INFO]  App successfully installed on device: AppcS iPhone5S
       [INFO]  Installing app on device: AppC S iPad Gen4
       Please manually launch the application or press CTRL-C to quit
       
       [INFO]  App successfully installed on device: AppC S iPad Gen4
       [INFO]  Installing app on device: All Devices
       [ERROR] Device 'all' not connected
       [ERROR] Project failed to build after 25s 943ms
       
    Tested with below Environment:- 1. Mac OSX 10.9.4 2. Appcelerator Studio, build: 3.4.0.201409032106 3. Titanium SDK, build: 3.4.0.v20140908164913 4. Titanium CLI, build: 3.4.0-beta 5. Alloy: 1.5.0-beta2 6. Xcode 6 beta 7 7. iOS SDK 8.0 8. iPhone 5S (v8.0 beta 5) 9. iPad Gen 4 (v8.0 beta 5) With the a bad iOS device, its working as per the expectation.
  9. Chris Barber 2014-09-09

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/6037 3_4_X pull request: https://github.com/appcelerator/titanium_mobile/pull/6037 To test, connect 2 iOS devices, then build an app for device id "all": ti build -p ios -T device --device-id all
  10. Tim Poulsen 2014-09-09

    Installed to two iPads running iOS 7.1 using the command as described. PRs merged (note that the PRs are 6037 and 6038)
  11. Ewan Harris 2014-09-10

    Verified fix on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201409081810 Titanium SDK build: 3.4.0.v20140909144631 Titanium CLI, build: 3.4.0-rc Alloy: 1.5.0-beta2 iOS Devices iPad Mini (iOS8 GM Seed), iPhone 4s (iOS8 GM Seed), iPhone 4s (7.1.2) Created a new project and installed to an iPhone 4s and iPad Mini both running iOS8 GM Seed and also the iPad Mini running iOS8 GM Seed and an iPhone 4s running 7.1.2 in both CLI and studio. Was able to install to multiple devices in all scenarios.

JSON Source