{ "id": "99463", "key": "TIMOB-10501", "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": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14126", "description": "Sprint 2012-19 Core", "name": "Sprint 2012-19 Core", "archived": true, "released": true, "releaseDate": "2012-09-24" }, { "id": "14271", "description": "2012 Sprint 19", "name": "2012 Sprint 19", "archived": true, "released": true, "releaseDate": "2012-09-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-13T14:31:22.000+0000", "created": "2012-08-20T14:50:25.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "core", "module_api", "qe-testadded" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "21014", "type": { "id": "10011", "name": "Includes", "inward": "is included by", "outward": "includes" }, "inwardIssue": { "id": "98722", "key": "TIMOB-10320", "fields": { "summary": "iOS: CommonJS: doesn't show where is it the offending line of code is in a module", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-10-07T11:56:29.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Problem\r\nError console does not log errors that occur within CommonJS modules outside of the Exported code.\r\n\r\nh6.Expected results\r\nmodule.js should error on line 13 as foobar() is not a valid method of UI.view.\r\n\r\nh6.Actual result\r\nNo error is raised until line 10 of app.js, when the empty object is added to the window.\r\n\r\nh6.Tested on\r\niOS simulator\r\n\r\nh6.app.js\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n \ttitle: 'test'\r\n});\r\n\r\nvar obj = require('module');\r\nwin.add(obj);\r\n\r\nwin.open();\r\n{code}\r\n\r\nh6.module.js\r\n{code}\r\nexports = function(){\r\n\treturn createObj();\r\n}\r\n\r\nfunction createObj(){\r\n\tvar view = Ti.UI.createView({\r\n\t\twidth: 20,\r\n\t\theight: 20,\r\n\t\tbackgroundColor:'red'\r\n\t});\r\n\t\r\n\t//force error\r\n\tview.foobar();\r\n\t\r\n\treturn view;\r\n}\r\n{code}\r\n\r\nh6.Console output\r\n{code}\r\n[INFO] One moment, building ...\r\n[INFO] Detected third-party module: ti.location/1.0\r\n[INFO] Detected third-party module: ti.location/1.0\r\n[INFO] Titanium SDK version: 2.2.0 (08/01/12 17:01 b2782e9)\r\n[INFO] iPhone Device family: universal\r\n[INFO] iPhone SDK version: 5.1\r\n[INFO] iPhone simulated device: iphone\r\n[INFO] Performing full rebuild. This will take a little bit. Hold tight...\r\n[WARN] The project seems to be having custom info.plist which does not contain the `CFBundleShortVersionString` key\r\n[INFO] Generating the missing `CFBundleShortVersionString` key\r\n[INFO] Minimum iOS version: 4.0\r\n[INFO] Performing clean build\r\n[INFO] Launching application in Simulator\r\n[INFO] Launched application in Simulator (31.34 seconds)\r\n[INFO] Application started\r\n[INFO] 1BestPractices/1.0 (2.2.0.v20120801170113.b2782e9)\r\n[ERROR] Script Error = -[KrollCallback krollObjectForBridge:]: unrecognized selector sent to instance 0x8e95ed0 at app.js (line 8).\r\n[INFO] Application has exited from Simulator\r\n{code}\r\n\r\nh6.Customer's output\r\n{code}\r\n[INFO] One moment, building ...\r\n[DEBUG] Detecting modules in /Users/allenhartwig/Documents/Titanium Studio Workspace/test/modules\r\n[DEBUG] Detecting modules in /Users/allenhartwig/Library/Application Support/Titanium/modules\r\n[DEBUG] Detected module for android: ti.cloudpush 2.0.5 @ /Users/allenhartwig/Library/Application Support/Titanium/modules/android/ti.cloudpush/2.0.5\r\n[DEBUG] Detected module for android: ti.cloudpush 2.0.1 @ /Users/allenhartwig/Library/Application Support/Titanium/modules/android/ti.cloudpush/2.0.1\r\n[DEBUG] Detected module for commonjs: ti.cloud 2.2.0 @ /Users/allenhartwig/Library/Application Support/Titanium/modules/commonjs/ti.cloud/2.2.0\r\n[DEBUG] Detected module for commonjs: ti.cloud 2.1.0 @ /Users/allenhartwig/Library/Application Support/Titanium/modules/commonjs/ti.cloud/2.1.0\r\n[DEBUG] Detected module for commonjs: ti.cloud 2.0.5 @ /Users/allenhartwig/Library/Application Support/Titanium/modules/commonjs/ti.cloud/2.0.5\r\n[DEBUG] Detected module for commonjs: ti.cloud 2.0.1 @ /Users/allenhartwig/Library/Application Support/Titanium/modules/commonjs/ti.cloud/2.0.1\r\n[DEBUG] Detected module for iphone: ti.worker 1.0 @ /Users/allenhartwig/Library/Application Support/Titanium/modules/iphone/ti.worker/1.0\r\n[DEBUG] Detected module for iphone: ti.viewshadow 0.2 @ /Users/allenhartwig/Library/Application Support/Titanium/modules/iphone/ti.viewshadow/0.2\r\n[INFO] Titanium SDK version: 2.2.0 (08/08/12 13:21 5205295)\r\n[INFO] iPhone Device family: iphone\r\n[INFO] iPhone SDK version: 5.1\r\n[INFO] iPhone simulated device: iphone\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/app.js to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/app.js\r\n[DEBUG] creating: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/iphone\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/appicon.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/iphone/appicon.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/Default-Landscape.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/iphone/Default-Landscape.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/Default-Portrait.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/iphone/Default-Portrait.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/Default.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/iphone/Default.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/Default@2x.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/iphone/Default@2x.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/KS_nav_ui.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/KS_nav_ui.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/KS_nav_views.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/KS_nav_views.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/module.js to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/module.js\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/appicon.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/appicon.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/Default-Landscape.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/Default-Landscape.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/Default-Portrait.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/Default-Portrait.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/Default.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/Default.png\r\n[DEBUG] linking: /Users/allenhartwig/Documents/Titanium Studio Workspace/test/Resources/iphone/Default@2x.png to /Users/allenhartwig/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator/test.app/Default@2x.png\r\n[INFO] Minimum iOS version: 4.0\r\n[DEBUG] executing command: /usr/bin/killall ios-sim\r\n[DEBUG] No matching processes belonging to you were found\r\n[DEBUG] executing command: /usr/bin/killall iPhone Simulator\r\n[DEBUG] No matching processes belonging to you were found\r\n[DEBUG] finding old log files\r\n[DEBUG] executing command: mdutil -a -s\r\n[DEBUG] /:\r\n[DEBUG] Indexing enabled.\r\n[DEBUG] /Volumes/Downloads:\r\n[DEBUG] Server search enabled.\r\n[DEBUG] /Volumes/HPVirtualRooms:\r\n[DEBUG] Indexing disabled.\r\n[DEBUG] Searching for old log files with mdfind...\r\n[DEBUG] executing command: mdfind -onlyin /Users/allenhartwig/Library/Application Support/iPhone Simulator/5.1 -name 430cbd11-d4d2-4e12-92a6-4ed2196751d0.log\r\n[INFO] Launching application in Simulator\r\n[INFO] Launched application in Simulator (18.53 seconds)\r\n[INFO] Application started\r\n[DEBUG] Reading stylesheet from: /Users/allenhartwig/Library/Application Support/iPhone Simulator/5.1/Applications/026293D3-C940-4551-932F-794BA0CAC799/test.app/stylesheet.plist\r\n[INFO] test/1.0 (2.2.0.v20120808132114.5205295)\r\n[DEBUG] Analytics is enabled = YES\r\n[DEBUG] Loading: /Users/allenhartwig/Library/Application Support/iPhone Simulator/5.1/Applications/026293D3-C940-4551-932F-794BA0CAC799/test.app/app.js, Resource: app_js\r\n[DEBUG] Loading: /Users/allenhartwig/Library/Application Support/iPhone Simulator/5.1/Applications/026293D3-C940-4551-932F-794BA0CAC799/test.app/module.js, Resource: module_js\r\n2012-08-19 14:22:17.755 test[33786:1ac03] -[KrollCallback krollObjectForBridge:]: unrecognized selector sent to instance 0x9948060\r\n[ERROR] Script Error = -[KrollCallback krollObjectForBridge:]: unrecognized selector sent to instance 0x9948060 at app.js (line 10).\r\n[DEBUG] Application booted in 198.106050 ms\r\nTerminating in response to SpringBoard's termination.\r\n[INFO] Application started\r\n[DEBUG] Reading stylesheet from: /Users/allenhartwig/Library/Application Support/iPhone Simulator/5.1/Applications/026293D3-C940-4551-932F-794BA0CAC799/test.app/stylesheet.plist\r\n[INFO] test/1.0 (2.2.0.v20120808132114.5205295)\r\n[DEBUG] Analytics is enabled = YES\r\n[DEBUG] Loading: /Users/allenhartwig/Library/Application Support/iPhone Simulator/5.1/Applications/026293D3-C940-4551-932F-794BA0CAC799/test.app/app.js, Resource: app_js\r\n[DEBUG] Loading: /Users/allenhartwig/Library/Application Support/iPhone Simulator/5.1/Applications/026293D3-C940-4551-932F-794BA0CAC799/test.app/module.js, Resource: module_js\r\n2012-08-19 14:22:48.378 test[33837:1ac03] -[KrollCallback krollObjectForBridge:]: unrecognized selector sent to instance 0x9919ae0\r\n[ERROR] Script Error = -[KrollCallback krollObjectForBridge:]: unrecognized selector sent to instance 0x9919ae0 at app.js (line 10).\r\n[DEBUG] Application booted in 10.446966 ms\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: No error logging on non-exported CommonJS code", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 2.1.1.GA, 2.2 CI Build\r\niOS 5", "comment": { "comments": [ { "id": "215290", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@Neeraj - From that standpoint I'd agree. If the mechanism that forces the error is removed, the app would successfully compile as per the following settings: \r\n\r\n- app.js\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\nvar win = Titanium.UI.createWindow({ \r\n title: 'test'\r\n});\r\n \r\nvar obj = require('module')();\r\nwin.add(obj);\r\n \r\nwin.open();\r\n{code}\r\n\r\n- module.js\r\n{code}\r\nexports = function(){\r\n return createObj();\r\n};\r\n \r\nfunction createObj(){\r\n var view = Ti.UI.createView({\r\n width: 20,\r\n height: 20,\r\n backgroundColor:'red'\r\n });\r\n \r\n //force error\r\n //view.foobar();\r\n \r\n return view;\r\n}\r\n{code}\r\n\r\nHowever when the presence of the mechanism described before is in module.js (by just uncommenting view.foobar(); method of UIView) the app would throw the following error:\r\n\r\n- [ERROR] Script Error = 'undefined' is not a function (evaluating 'view.foobar()') (unknown file).\r\n\r\nWhich is not useful when debugging larger and complex apps (whether on exported or non exported commonJS modules), and basically what this jira ticket address.", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-20T22:42:12.000+0000", "updated": "2012-08-20T22:42:12.000+0000" }, { "id": "218397", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR pending https://github.com/appcelerator/titanium_mobile/pull/2906\r\n\r\nFixes source file information for error reporting. Please note that line information displayed is expected to be incorrect given that JS code is compressed within modules.", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-11T10:51:43.000+0000", "updated": "2012-09-11T10:51:43.000+0000" }, { "id": "218924", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull merged", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-13T14:31:22.000+0000", "updated": "2012-09-13T14:31:22.000+0000" }, { "id": "219109", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Backport PR https://github.com/appcelerator/titanium_mobile/pull/2964", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-14T16:23:30.000+0000", "updated": "2012-09-14T16:23:30.000+0000" }, { "id": "220150", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fix on:\r\nTitanium studio : 2.1.2.201208301612\r\nSDK version : 2.1.3.v20120920154617\r\nSDK Version : 3.0.0.v20120921051359\r\niOS simulator\r\nxcode 4.5", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-09-21T11:12:30.000+0000", "updated": "2012-09-21T11:12:30.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }