Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11531] CLI: iOS: Modules - Cannot install modules onto iOS

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2012-11-02T19:11:35.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, 2012 Sprint 21 JS, 2012 Sprint 21
ComponentsTooling
Labelsqe-cli, qe-ios100112, qe-nfc
ReporterWilson Luu
AssigneeChris Barber
Created2012-10-18T20:14:49.000+0000
Updated2012-11-02T19:11:35.000+0000

Description

Details: If you install an app to an iOS device with either an iOS module or CommonJS module, then the app will not be able to find the module. \\ \\ *Note:* You *can* install an app to an Android device with either an Android module or CommonJS module This bug does not appear in SDK build 2.1.3 \\ \\ Steps to reproduce: 1. Download monkeyModule.zip attachment 2. Unzip attachment and import project into TiStudio 3. Make sure to add the ti.cloud module in tiapp.xml (TISTUD-2564) \\ \\ -4. Install app to iOS device- -Actual: During installation of app, console will print out this error message:-
[ERROR] :  TypeError: Cannot read property 'Build' of undefined
    at translate (/Users/wluu/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121007054913/node_modules/node-appc/node_modules/i18n/i18n.js:226:23)
    at i18n.__ (/Users/wluu/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121007054913/node_modules/node-appc/node_modules/i18n/i18n.js:85:13)
    at Object.<anonymous> (/Users/wluu/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121007054913/cli/commands/build.js:17:17)
    at Module.Module._compile [as _compile] (module.js:449:26)
    at Object.Module._extensions..js [as .js] (module.js:467:10)
    at Module.Module.load [as load] (module.js:356:32)
    at Function.Module._load [as _load] (module.js:312:12)
    at Module.Module.require [as require] (module.js:362:17)
    at require (module.js:378:17)
    at loadCommand (/usr/local/lib/node_modules/titanium/lib/cli.js:863:13)
\\ \\ 4. Launch app on iOS device Actual: iOS cannot find module (see no_module.png) \\ \\ Expected: Should be able to install apps with modules \\ \\ *Note:* To test with iOS module, in app.js, comment line 2 and uncomment line 3. Then repeat steps 4-5

Attachments

FileDateSize
latestGreatest.zip2012-10-18T23:18:36.000+00002905748
monkeyModule.zip2012-10-18T20:14:49.000+00003707874
no_module.png2012-10-18T20:14:49.000+000086377

Comments

  1. Chris Barber 2012-10-18

    You're using an ancient version of the Titanium SDK. Please try again using the latest 3.0.X CI build.
  2. Wilson Luu 2012-10-18

    Tried with latest SDK build: 3.0.0.v20121018140140 and still got the same bug behavior. \\ \\ Also, current work around is following: 1. Remove titanium package from /usr/local/lib/node_modules 2. Open /Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/TitaniumStudio.ini 3. Add this flag: -Dtitanium.bypassNewCLI 4. Restart TiStudio 5. Do not try to install latest Titanium CLI 6. Install app to device
  3. Chris Barber 2012-10-18

    Please update the error message. It's IMPOSSIBLE that the error is occurring on line 17 of /Users/wluu/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121007054913/cli/commands/build.js because line 17 is a comment. What is the error?
  4. Wilson Luu 2012-10-18

    Uploading new titanium project
  5. Chris Barber 2012-10-18

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3294 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3295
  6. Wilson Luu 2012-10-19

    Reopening bug. I can install app with iOS module (latestGreatest.zip). But, I still can't install app with CommonJS module (monkeyModule.zip). \\ \\ To reproduce the CommonJS module bug, follow above bug steps with monkeyModule.zip. \\ \\ Tested with: SDK build: 3.0.0.v20121018170119 Device: iphone 4 (4.3.5)
  7. Chris Barber 2012-10-19

    I looked into the commonjs stuff and it works just fine. Please test again.
  8. Bryan Hughes 2012-10-19

    Also note: the stack trace listed above references a node module called i18n, but we removed that module some time ago. Can you please do a clean install of the CLI (i.e. remove the old directory)? I wonder if there's some old code causing this behavior and updating will fix it by itself.
  9. Bryan Hughes 2012-10-19

    After doing some digging, that stack trace is definitely not valid anymore. Line 17 of build is just a comment.
  10. Wilson Luu 2012-10-19

    Sorry, the above bug behavior is a little outdated. Will update the repo steps.
  11. Blain Hamon 2012-10-19

    Could not reproduce, bhughes and I are talking with QE and see if they can reproduce with the latest build.
  12. Eric Merriman 2012-10-19

    Verified occurring with: CLI: 3.0.7 Titanium Studio, build: 3.0.0.201210182149 SDK: 3.0.0.v20121019103112 Delivered build folder to dev as requested.
  13. Chris Barber 2012-10-19

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3305 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3306
  14. Natalie Huynh 2012-10-20

    Tested with SDK: 3.0.0.v20121019153308 iPhone 4 4.3.5

JSON Source