[TIMOB-11531] CLI: iOS: Modules - Cannot install modules onto iOS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-11-02T19:11:35.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.0, 2012 Sprint 21 JS, 2012 Sprint 21 |
Components | Tooling |
Labels | qe-cli, qe-ios100112, qe-nfc |
Reporter | Wilson Luu |
Assignee | Chris Barber |
Created | 2012-10-18T20:14:49.000+0000 |
Updated | 2012-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
File | Date | Size |
---|---|---|
latestGreatest.zip | 2012-10-18T23:18:36.000+0000 | 2905748 |
monkeyModule.zip | 2012-10-18T20:14:49.000+0000 | 3707874 |
no_module.png | 2012-10-18T20:14:49.000+0000 | 86377 |
You're using an ancient version of the Titanium SDK. Please try again using the latest 3.0.X CI build.
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
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?
Uploading new titanium project
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3294 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3295
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)
I looked into the commonjs stuff and it works just fine. Please test again.
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.
After doing some digging, that stack trace is definitely not valid anymore. Line 17 of build is just a comment.
Sorry, the above bug behavior is a little outdated. Will update the repo steps.
Could not reproduce, bhughes and I are talking with QE and see if they can reproduce with the latest build.
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.
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3305 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3306
Tested with SDK: 3.0.0.v20121019153308 iPhone 4 4.3.5