{ "id": "103199", "key": "TIMOB-11408", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14169", "description": "2012 Sprint 22 Core", "name": "2012 Sprint 22 Core", "archived": true, "released": true, "releaseDate": "2012-11-05" }, { "id": "14274", "description": "2012 Sprint 22", "name": "2012 Sprint 22", "archived": true, "released": true, "releaseDate": "2012-11-05" }, { "id": "15104", "description": "2013 Sprint 03 API", "name": "2013 Sprint 03 API", "archived": true, "released": true, "releaseDate": "2013-02-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-01-29T23:37:31.000+0000", "created": "2012-10-12T09:05:32.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "core", "qe-and100112", "qe-port", "regression" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "21969", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "103082", "key": "TIMOB-11369", "fields": { "summary": "Android: Brightcove -v8: Call 'Get Videos' and 'Get Playlists' API's causes Runtime Error on Android", "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 } } } }, { "id": "22135", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "103569", "key": "TIMOB-11525", "fields": { "summary": "Android: Relative path for Window URL does not work on 3_0_X", "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": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-02-04T07:14:20.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "This is a regression. It works fine on 2.1.3GA.\r\n\r\nWhen the app is run, a runtime error is thrown - \"Message: Uncaught ReferenceError: require is not defined\". Log attached.\r\n\r\nSteps to reproduce:\r\n1. Use the following code in app.js\r\n{code}\r\nTi.UI.createWindow({\r\n\turl: \"win.js\", // causes new JS context\r\n\tbackgroundColor: \"#000\",\r\n\texitOnClose: true\r\n}).open();\r\n{code}\r\n\r\n2. Create a file 'included.js' under 'Resources' folder and add the code below in it-\r\n{code}\r\nvar includedWord = \"YES\";\r\n{code}\r\n\r\n3. Create another file win.js under 'Resources' folder and add the code below in it-\r\n{code}\r\nrequire(\"module\"); // Don't need return value, just important that this runs.\r\nTi.include(\"included.js\");\r\nalert(\"Does this app work (YES/NO)? \\nAnswer: \" + includedWord);\r\n{code}\r\n\r\n4. Paste the attached file 'module.js' under the 'Resources' folder.\r\n\r\n5. Run the app on android device.\r\n\r\nExpected result:\r\nApp should display an alert 'Does this app work? YES!' \r\n\r\nActual result:\r\nA runtime error is thrown. Error log attached.", "attachment": [ { "id": "32950", "filename": "module.js", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-25T10:25:44.000+0000", "size": 42, "mimeType": "text/javascript" }, { "id": "32556", "filename": "TIMOB 5434.rtf", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-12T09:05:32.000+0000", "size": 1112, "mimeType": "text/rtf" } ], "flagged": false, "summary": "Android: Runtime error is thrown for require method when called from window opened via URL", "creator": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [ { "id": "108816", "key": "TIMOB-12484", "fields": { "summary": "Backport to 3_0_X: TIMOB-11408", "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": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } ], "reporter": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK: 3.0.0.v20121011174610 (RHINO & V8)\r\nTitanium  Studio: 3.0.0.201210101947\r\nDevice : Android 2.2 LG-P970\r\nXcode : 4.5 \r\nMachine OS : MAC 10.8", "comment": { "comments": [ { "id": "223714", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created [PR #3244 |https://github.com/appcelerator/titanium_mobile/pull/3244] to resolve issue on master.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-16T00:00:05.000+0000", "updated": "2012-10-16T00:00:05.000+0000" }, { "id": "223760", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Master merge done. Ready for 3.0.X PR.\n\n*Note for future testers*: The person who created the ticket didn#t include module.js, so success in this case actually means getting an error that the module is not found, as opposed to the error that require is not defined.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-10-16T11:08:36.000+0000", "updated": "2012-10-16T11:08:36.000+0000" }, { "id": "223880", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created [PR #3252|https://github.com/appcelerator/titanium_mobile/pull/3252] to back port fix into 3_0_X.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-16T21:40:56.000+0000", "updated": "2012-10-16T21:40:56.000+0000" }, { "id": "223913", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "3_0_X PR merged.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-10-16T23:29:00.000+0000", "updated": "2012-10-16T23:29:00.000+0000" }, { "id": "224906", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please use the module.js attached (module_timob5434) to reproduce the issue along with other files.It still gives same error 'Message: Uncaught ReferenceError: require is not defined'.\r\n\r\nTested it with :\r\nTitanium SDK:3.0.0.v20121024144610\r\nTitanium  Studio:3.0.0.201210220122", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-25T10:23:09.000+0000", "updated": "2012-10-25T10:24:58.000+0000" }, { "id": "225464", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This should as a part of this PR: https://github.com/appcelerator/titanium_mobile/pull/3321", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-30T00:14:46.000+0000", "updated": "2012-10-30T00:14:46.000+0000" }, { "id": "227992", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Its working fine now.\r\nTitanium SDK: 3.1.0.v20121119222601\r\nTitanium SDK:3.0.0.v20121113170203\r\nTitanium  Studio:3.0.0.201211131839\r\nDevice : Android 2.2 LG-P970\r\nXcode : 4.5 \r\nMachine OS : MAC 10.8", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-20T11:14:49.000+0000", "updated": "2012-11-20T11:31:15.000+0000" }, { "id": "236370", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue occurs again in the latest 3_0_X build: ffb007d573b779957baebb82895f7bf0b0f60d32", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-29T02:29:32.000+0000", "updated": "2013-01-29T02:29:32.000+0000" }, { "id": "236508", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This regression is caused by [PR#3321|https://github.com/appcelerator/titanium_mobile/pull/3321]\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/3818\r\nFor FR:\r\n1. Run the test case in the ticket. It should run without any crash.\r\n2. Run the test case below. It should run without any crash. The log should show:\r\n{quote}\r\nI/TiAPI (13592): ******************** module.text = I'm module\r\nI/TiAPI (13592): ******************** module.includedWord = YES\r\nI/TiAPI (13592): *************** inside module.x\r\n{quote}\r\napp.js\r\n{code}\r\nTi.UI.createWindow({\r\n url: \"win.js\", // causes new JS context\r\n backgroundColor: \"#000\",\r\n exitOnClose: true\r\n}).open();\r\n{code}\r\nwin.js\r\n{code}\r\nvar module = require(\"module\");\r\nTi.API.info(\"******************** module.text = \" + module.text);\r\nTi.API.info(\"******************** module.includedWord = \" + module.includedWord);\r\nmodule.x();\r\n\r\nTi.include(\"included.js\");\r\nalert(\"Does this app work (YES/NO)? \\nAnswer: \" + includedWord);\r\n{code}\r\nmodule.js\r\n{code}\r\nexports.x = function() {\r\n\tconsole.log(\"*************** inside module.x\");\r\n};\r\nexports.text = \"I'm module\";\r\n\r\nTi.include(\"included.js\");\r\nexports.includedWord = includedWord;\r\n{code}\r\nincluded.js\r\n{code}\r\nvar includedWord = \"YES\";\r\n{code}\r\n3. Run the test cases in TIMOB-10783, TIMOB-10091, TIMOB-11307, TIMOB-5748.\r\n4. Run KS.\r\n5. Run Anvil -> includes/includes test suite. simpleRequire, secondContextRequire, multipleRequire and includeFromUrlWindow should pass.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-29T21:56:54.000+0000", "updated": "2013-01-29T22:49:36.000+0000" }, { "id": "237016", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with: \r\nSDK:3.0.2.v20130201161712\r\nStudio: 3.0.2.201301281948\r\nDevice: iPhone3GS(v 5.0.1), iPhone5(v 6.0)\r\n\r\nNo runtime error is thrown.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-04T07:14:20.000+0000", "updated": "2013-02-04T07:14:20.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }