{ "id": "98722", "key": "TIMOB-10320", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14803", "description": "2013 Sprint 01 Core", "name": "2013 Sprint 01 Core", "archived": true, "released": true, "releaseDate": "2013-01-14" }, { "id": "14804", "description": "2013 Sprint 01", "name": "2013 Sprint 01", "archived": true, "released": true, "releaseDate": "2013-01-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-01-14T14:09:49.000+0000", "created": "2012-08-06T11:02:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "core", "module_require", "notable", "qe-testadded" ], "versions": [ { "id": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "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" }, "outwardIssue": { "id": "99463", "key": "TIMOB-10501", "fields": { "summary": "iOS: No error logging on non-exported CommonJS code", "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-07-17T06:14:55.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\nIt looks like the source file doesn't show when the offending line of code is in a commonjs module. The customer needs to identify where is the offending code line in order to narrow down the issue quicker.\r\n\r\nh6.Tested on\r\niOS 5.1 Simulator\r\n\r\nh3.Console \r\nh6.Actual output\r\n{code}\r\n[INFO] Launching application in Simulator\r\n[INFO] Launched application in Simulator (23.09 seconds)\r\n[INFO] Application started\r\n[DEBUG] Reading stylesheet from: /Users/egomez/Library/Application Support/iPhone Simulator/5.1/Applications/A959F667-67EF-4247-A3DE-D0D4CB33EE06/Test.app/stylesheet.plist\r\n[INFO] Test/1.0 (2.2.0.v20120801170113.b2782e9)\r\n[DEBUG] Analytics is enabled = YES\r\n[DEBUG] Loading: /Users/egomez/Library/Application Support/iPhone Simulator/5.1/Applications/A959F667-67EF-4247-A3DE-D0D4CB33EE06/1BestPractices.app/app.js, Resource: app_js\r\n[DEBUG] Loading: /Users/egomez/Library/Application Support/iPhone Simulator/5.1/Applications/A959F667-67EF-4247-A3DE-D0D4CB33EE06/1BestPractices.app/module.js, Resource: module_js\r\n[ERROR] Invalid type passed to function. expected: NSArray or nil, was: __NSCFString in -[TiUIEmailDialogProxy open:] (TiUIEmailDialogProxy.m:64)\r\n[ERROR] Script Error = Invalid type passed to function. expected: NSArray or nil, was: __NSCFString in -[TiUIEmailDialogProxy open:] (TiUIEmailDialogProxy.m:64) (unknown file).\r\n[DEBUG] Application booted in 11.829019 ms\r\n{code}\r\n\r\nh6.Proposed-Expected output\r\n{code}\r\n[INFO] {\r\n line = 10;\r\n message = \"'Script Error = Invalid type passed to function.\";\r\n name = ScriptError;\r\n sourceId = 270794016;\r\n sourceURL = \"file://localhost/Users/egomez/Library/Application%20Support/iPhone%20Simulator/5.1/Applications/CCA98E58-E7A1-453D-860E-4E310AA5F374/Test.app/module.js\";\r\n}\r\n{code}\r\n\r\nh3.Test case\r\n- app.js\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ backgroundColor:'#fff' });\r\n\r\nvar accessor = require('module');\r\naccessor.buildEmailView(/* to */ 'email@appc.com', /* subject */ 'Testing', /* defaultBody */ 'DefaultBody');\r\n\r\nwin1.open();\r\n{code}\r\n\r\n- module.js\r\n{code}\r\nexports.buildEmailView = function(to, subject, defaultBody) {\r\n \r\n var emailDialog = Ti.UI.createEmailDialog();\r\n emailDialog.setSubject(subject);\r\n emailDialog.setToRecipients(to);\r\n emailDialog.setMessageBody(defaultBody);\r\n emailDialog.setHtml(true);\r\n emailDialog.setBarColor('#312f2c');\r\n\t\r\n\t emailDialog.open();\r\n \r\n emailDialog.addEventListener('complete',function(e)\r\n {\r\n if (e.result == emailDialog.SENT)\r\n {\r\n alert(\"message was sent\");\r\n }\r\n else\r\n {\r\n alert(\"message was not sent. result = \"+e.result);\r\n }\r\n });\r\n \r\n};\r\n{code}\r\n\r\nh6.TiStudio version\r\nTitanium Studio, build: 2.2.0.201208021836\r\n(c) Copyright 2012 by Appcelerator, Inc. All rights reserved.\r\n\r\nBuild: jenkins-titanium-rcp-development-921 (origin/development)\r\nDate: 02 August 2012, 18:39:42", "attachment": [ { "id": "30294", "filename": "AppError_2.2.jpg", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-06T11:02:43.000+0000", "size": 93364, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "iOS: CommonJS: doesn't show where is it the offending line of code is in a module", "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": "Product: Mobile\r\nTitanium SDK: Mobile 2.1\r\nPlatform OS: iOS\r\nPlatform OS Version: 5", "comment": { "comments": [ { "id": "213950", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Getting exception info is painful. IMHO, exception data should be standardized (file, line number, error type and message should be available on all platforms).", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-08-11T13:12:43.000+0000", "updated": "2012-08-11T13:12:43.000+0000" }, { "id": "219112", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This ticket is partially fixed by TIMOB-10501.\r\nMore exception details is to come.", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-14T16:27:47.000+0000", "updated": "2012-09-14T16:27:47.000+0000" }, { "id": "232248", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/3625", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-20T22:33:42.000+0000", "updated": "2012-12-20T22:33:42.000+0000" }, { "id": "233755", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "CR rejected. Methods would be difficult to maintain and there are more elegant solutions.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-09T17:52:00.000+0000", "updated": "2013-01-09T17:52:00.000+0000" }, { "id": "234032", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "CR and FR passed, pull merged. For some reason, it won't let me update the status. Please change to 'Review passed' or the like.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-11T16:11:10.000+0000", "updated": "2013-01-11T16:11:10.000+0000" }, { "id": "234236", "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": "2013-01-14T14:09:49.000+0000", "updated": "2013-01-14T14:09:49.000+0000" }, { "id": "262135", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updated label.\r\nClosing as fixed.\r\nVerified with:\r\n\r\nStudio: 3.1.2.201307121617\r\nTitanium SDK: 3.1.2.v20130710144553\r\nacs:1.0.3\r\nalloy:1.1.3\r\nnpm:1.2.14\r\ntitanium:3.1.1\r\ntitanium-code-processor:1.0.1\r\nOS: OSX 10.8\r\nDevice:iPhone Simulator(v6.0) iphone4(v5.1)\r\nXcode: 4.5.1\r\n\r\nCommonJS showing proper error which is offending line of code as per expectation.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-17T06:14:55.000+0000", "updated": "2013-07-17T06:14:55.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }