{ "id": "150854", "key": "TIMOB-19447", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-09-01T17:52:46.000+0000", "created": "2015-08-31T14:35:34.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-5.0.0" ], "versions": [], "issuelinks": [ { "id": "48841", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "149998", "key": "TIMOB-19285", "fields": { "summary": "iOS: App throws error when building to device with commonjs modules", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2015-09-01T21:25:38.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10207", "name": "Tooling" } ], "description": "h5. Description:\r\nScript Error Couldn't find module: ti.cloud for architecture: x86_64\r\n\r\nWhen creating a project from the Appcelerator CLI and building to simulator, the app throws a runtime error as shown.\r\n\r\nNOTE: This only occurs when creating a project from the Appc CLI. Creating a project using Studio with or without services runs as expected.\r\n\r\nh5. Steps to reproduce:\r\n1) Using Appc CLI, create a new Titanium project\r\n2) Use \"appc run\" command to launch, choose iOS simulator \r\n\r\nh5. Result:\r\nRuntime error on device\r\n\r\nh5. Expected Result:\r\nApplication runs as expected\r\n\r\nh5. Note:\r\nA diff on the projects prior to run (created in studio versus appc CLI) shows only the following additional lines included in the alloy.js in the project created by Appc CLI:\r\n{code}// added during app creation. this will automatically login to\r\n// ACS for your application and then fire an event (see below)\r\n// when connected or errored. if you do not use ACS in your\r\n// application as a client, you should remove this block\r\n(function(){\r\nvar ACS = require('ti.cloud'),\r\n env = Ti.App.deployType.toLowerCase() === 'production' ? 'production' : 'development',\r\n username = Ti.App.Properties.getString('acs-username-'+env),\r\n password = Ti.App.Properties.getString('acs-password-'+env);\r\n\r\n// if not configured, just return\r\nif (!env || !username || !password) { return; }\r\n/**\r\n * Appcelerator Cloud (ACS) Admin User Login Logic\r\n *\r\n * fires login.success with the user as argument on success\r\n * fires login.failed with the result as argument on error\r\n */\r\nACS.Users.login({\r\n\tlogin:username,\r\n\tpassword:password,\r\n}, function(result){\r\n\tif (env==='development') {\r\n\t\tTi.API.info('ACS Login Results for environment `'+env+'`:');\r\n\t\tTi.API.info(result);\r\n\t}\r\n\tif (result && result.success && result.users && result.users.length){\r\n\t\tTi.App.fireEvent('login.success',result.users[0],env);\r\n\t} else {\r\n\t\tTi.App.fireEvent('login.failed',result,env);\r\n\t}\r\n});\r\n\r\n})();\r\n{code}", "attachment": [ { "id": "56556", "filename": "Screen Shot 2015-08-31 at 7.31.51 AM.png", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-31T14:35:32.000+0000", "size": 619355, "mimeType": "image/png" } ], "flagged": false, "summary": "Launching titanium app from latest fails on OS X", "creator": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS 10.10.3\r\nAlloy: 1.7.6\r\nTitanium CLI: 4.1.5\r\nAppc CLI: 5.0.0-32\r\nAppc CLI NPM: 4.2.0-1\r\nTitanium SDK version 5.0.0.v20150831120637\r\nAppcelerator Studio, build: 4.2.0.201508141038\r\nXcode 6.4.0", "comment": { "comments": [ { "id": "361783", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "on a subsequent launch, it worked. seems to be related to a new project.", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-31T14:37:14.000+0000", "updated": "2015-08-31T14:37:14.000+0000" }, { "id": "361940", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "should this be moved into TIMOB? seems like a blocker for the release to me.\r\n", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-01T15:31:10.000+0000", "updated": "2015-09-01T15:31:10.000+0000" }, { "id": "361952", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "This issue is reproducible by building an iOS app using any globally installed CommonJS module and doing a device or dist build:\r\n\r\n{{ti build -p ios -T device --build-only}}\r\n\r\n{code}\r\n[INFO] Processing JavaScript files\r\n[DEBUG] Copying and minifying /Users/chris/appc/workspace/testapp5/Resources/app.js => /Users/chris/appc/workspace/testapp5/build/iphone/assets/app_js\r\n[DEBUG] Copying and minifying /Users/chris/Library/Application Support/Titanium/modules/commonjs/ti.cloud/3.2.9/ti.cloud.js =>\r\n /Users/chris/appc/workspace/testapp5/build/iphone/assets/Users/chris/Library/Application Support/Titanium/modules/commonjs/ti_cloud/3_2_9/ti_cloud_js\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n{code}\r\n\r\nThe map of JS files uses relative paths for the key. The only time the key is absolute is when you are using a global CommonJS module. The fix is pretty simple. If it's an absolute path, just do a {{path.basename()}} on the original file path.\r\n\r\nNote: This is not an Appc CLI specific issue. This is not an Alloy issue.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-09-01T17:18:19.000+0000", "updated": "2015-09-01T17:18:59.000+0000" }, { "id": "361960", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/7108\r\n5_0_X: https://github.com/appcelerator/titanium_mobile/pull/7109", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-09-01T17:45:36.000+0000", "updated": "2015-09-01T17:45:36.000+0000" }, { "id": "361987", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified that after I create a mobile project and launch te mobile app with latest mobile SDK, then I do not get the {{Couldn't find module}} error.\r\n\r\nTested on:\r\n\r\nAppc CLI NPM: 4.2.0-1\r\nAppc CLI Core: 5.0.0-33\r\nArrow: 1.2.52\r\nSDK: 5.0.0.v20150901105514\r\nNode: v0.10.38\r\nOS: Yosemite (10.10.5)\r\nXcode: 7 beta 6\r\nDevices: iphone 6 simulator (9.0)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-01T21:25:23.000+0000", "updated": "2015-09-01T21:25:23.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }