{ "id": "101316", "key": "TIMOB-11294", "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" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-08-14T20:57:52.000+0000", "created": "2012-09-17T06:33:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_require", "qe-and100112", "qe-manualtest", "qe-port" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "22466", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "89173", "key": "TIMOB-8424", "fields": { "summary": "Ti API: Define cross platform logging API", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-14T20:57:52.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": "[ERROR][TiJSError( 744)] (main) [0,1111] - Message: Uncaught ReferenceError: console is not defined\r\n[ERROR][TiJSError( 744)] (main) [0,1111] - Source:console.debug(\"drawAnnotation\");\r\n\r\nAnother Log:\r\n\r\n{code}\r\n[ERROR][TiExceptionHandler( 656)] (main) [618,1470] ----- Titanium Javascript Runtime Error -----\r\n[ERROR][TiExceptionHandler( 656)] (main) [1,1471] - In require.js:1,1\r\n[ERROR][TiExceptionHandler( 656)] (main) [0,1471] - Message: Uncaught ReferenceError: console is not defined\r\n[ERROR][TiExceptionHandler( 656)] (main) [0,1471] - Source: console.log('require');\r\n[ERROR][V8Exception( 656)] Exception occurred at require.js:1: Uncaught ReferenceError: console is not defined\r\n{code}\r\n\r\nseems like console works fine on IOS but throws errors on Android.\r\n\r\nAny console object calls in a commonjs module will fail on android, they work from app.js though.\r\n\r\nThis is not a regression.\r\n\r\nDocs: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Global.console\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run code:\r\n\r\nrequire.js\r\n{code}\r\nconsole.log('console.log');\r\nconsole.debug('console.debug');\r\nconsole.warn('console.warn');\r\nconsole.error('console.error');\r\nconsole.info('console.info');\r\n{code}\r\n\r\napp.js\r\n{code}\r\nrequire('require');\r\n{code}\r\nActual Result:\r\n\r\nRuntime error.\r\n\r\nExpected Result:\r\n\r\nConsole message logged.", "attachment": [], "flagged": false, "summary": "Android: console: log functions fail in commonjs require", "creator": { "name": "aaron@clearlyinnovative.com", "key": "aaron@clearlyinnovative.com", "displayName": "Aaron K. Saunders", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "aaron@clearlyinnovative.com", "key": "aaron@clearlyinnovative.com", "displayName": "Aaron K. Saunders", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium Studio: 3.0.0.201210181724\r\nTitanium SDK: 3.0.0.v20121018214614, 2.1.3.GA\r\nTitanium CLI: 3.0.6\r\nOS: Mountain Lion 10.8.2\r\nAndroid Emulator: 2.2", "comment": { "comments": [ { "id": "222448", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This was originally logged as a TC ticket, then moved to ALOY. As \"drawAnnotation\" is used nowhere in the Alloy code, I'm assuming this is either related to the test code used to generate this error, or an underlying Android issue. I\"ll add myself as a watcher in case this does in fact turn out to be Alloy-specific.\n\nAaron, can you provide the test code necessary to reproduce this error?", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-08T00:25:10.000+0000", "updated": "2012-10-08T00:25:10.000+0000" }, { "id": "224461", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updating ticket.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-19T16:05:21.000+0000", "updated": "2012-10-19T16:05:21.000+0000" }, { "id": "224466", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It's a scope problem.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-19T16:31:56.000+0000", "updated": "2012-10-19T16:31:56.000+0000" }, { "id": "225581", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/3360", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-30T21:38:15.000+0000", "updated": "2012-10-30T21:38:15.000+0000" }, { "id": "225851", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also fails in win.url files.\n\napp.js\n\n{code}\nTi.API.info('win.url.open()');\n\nvar win = Ti.UI.createWindow({\n\turl : 'module.js'\n});\n\nwin.open();\n{code}\n\nmodule.js\n\n{code}\nconsole.log('console LOG');\nconsole.log(['console LOG', 'ARG1', 'ARG2']);\n \nconsole.debug('console DEBUG');\nconsole.debug(['console DEBUG', 'ARG1', 'ARG2']);\n \nconsole.info('console INFO');\nconsole.info(['console INFO', 'ARG1', 'ARG2']);\n \nconsole.warn('console WARN');\nconsole.warn(['console WARN', 'ARG1', 'ARG2']);\n\nconsole.error('console ERROR');\nconsole.error(['console ERROR', 'ARG1', 'ARG2']);\n{code}\n\nConsole Output:\n\n{code}\n[ERROR][TiJSError( 649)] (main) [558,1734] ----- Titanium Javascript Runtime Error -----\n[ERROR][TiJSError( 649)] (main) [0,1734] - In module.js:5,2\n[ERROR][TiJSError( 649)] (main) [0,1734] - Message: Uncaught ReferenceError: console is not defined\n[ERROR][TiJSError( 649)] (main) [1,1735] - Source: \tconsole.log('console LOG');\n[ERROR][V8Exception( 649)] Exception occurred at module.js:5: Uncaught ReferenceError: console is not defined\n{code}", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-01T20:27:11.000+0000", "updated": "2012-11-01T20:27:11.000+0000" }, { "id": "225889", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR for fixing window URL file: https://github.com/appcelerator/titanium_mobile/pull/3371", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-01T21:50:12.000+0000", "updated": "2012-11-01T21:50:12.000+0000" }, { "id": "228315", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3_0_X PR https://github.com/appcelerator/titanium_mobile/pull/3465", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-21T23:09:27.000+0000", "updated": "2012-11-21T23:09:27.000+0000" }, { "id": "229914", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Tested on: \r\nTitanium Studio, build: 3.0.0.201211301903\r\nTitanium SDK, builds: 3.0.0.v20121130200208; 3.1.0.v20121203181001\r\nDevices: Samsung Galaxy S III (4.0.4)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-04T19:50:27.000+0000", "updated": "2012-12-04T19:50:27.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }