{ "id": "127605", "key": "TIMOB-16619", "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": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-09-10T03:09:36.000+0000", "created": "2014-03-12T23:10:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "merge-4.1.1", "qe-nfc" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2015-10-21T22:40:08.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" }, { "id": "13600", "name": "LiveView", "description": "Live preview of Titanium apps" } ], "description": "NOTE : This is seen on post & pre 3.0 android devices & emulators.\r\n\r\nh5. Description:\r\n1. Create a default & replace the app.js with the sample code for action bar from the docs:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n title: \"Old Title\",\r\n navBarHidden: false\r\n});\r\nvar actionBar;\r\n\r\nwin.addEventListener(\"open\", function() {\r\n if (Ti.Platform.osname === \"android\") {\r\n if (! win.activity) {\r\n Ti.API.error(\"Can't access action bar on a lightweight window.\");\r\n } else {\r\n actionBar = win.activity.actionBar;\r\n if (actionBar) {\r\n actionBar.backgroundImage = \"/bg.png\";\r\n actionBar.title = \"New Title\";\r\n actionBar.onHomeIconItemSelected = function() {\r\n Ti.API.info(\"Home icon clicked!\");\r\n };\r\n }\r\n }\r\n }\r\n});\r\n\r\nwin.open();\r\n{code}\r\n2. Build for android device/emulator with live view enabled.\r\n\r\nh5. Actual Result:\r\n1. We see following error in console:\r\n{code}\r\n[INFO] : [LiveView] Error Evaluating app.js @ Line: undefined\r\n[ERROR] : ReferenceError: actionBar is not defined\r\n[ERROR] : File: app.js\r\n[ERROR] : Line: undefined\r\n[ERROR] : SourceId: undefined\r\n[ERROR] : Backtrace:\r\n[ERROR] : undefined\r\n{code}\r\n\r\nh5. Expected Result:\r\n1. We should not see any errors & liveview should work successfully.\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: LiveView throws errors if action bar is implemented in the app", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Environment:\r\nAppc Studio : 3.2.1.201402061120\r\nTi SDK : 3.3.0.v20140312115935\r\nMac OSX : 10.8.5\r\nAlloy : 1.3.1\t\r\nCLI - 3.2.1\r\nSamsung Galaxy S4 - android 4.2.2\r\nSony Xperia - android 2.3.7", "closedSprints": [ { "id": 377, "state": "closed", "name": "2015 Sprint 08 Tooling", "startDate": "2015-04-10T16:22:00.000Z", "endDate": "2015-04-25T00:00:00.000Z", "completeDate": "2015-04-30T19:39:26.044Z", "originBoardId": 121 }, { "id": 107, "state": "closed", "name": "2014 Sprint 10 Tooling", "startDate": "2014-05-12T16:00:00.000Z", "endDate": "2014-05-24T00:00:00.000Z", "completeDate": "2014-05-27T18:11:27.256Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "305760", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We'd like to try fixing this for 3.3.0. Possible?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-20T19:05:41.000+0000", "updated": "2014-05-20T19:05:41.000+0000" }, { "id": "306515", "author": { "name": "pinnamuri", "key": "pinnamuri", "displayName": "Praveen Innamuri", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Considering the limited use case (this issue will surface only when a variable is not initialized to any value, even null/undefined and defined only in the higher scope), we can defer it to the future versions - may be, for 3.4.0 release.", "updateAuthor": { "name": "pinnamuri", "key": "pinnamuri", "displayName": "Praveen Innamuri", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-05-27T19:34:40.000+0000", "updated": "2014-05-27T19:34:40.000+0000" }, { "id": "362696", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/liveview/pull/90", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-09-09T22:41:09.000+0000", "updated": "2015-09-09T22:41:09.000+0000" }, { "id": "362711", "author": { "name": "kkolipaka", "key": "kkolipaka", "displayName": "Kondal Kolipaka", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Merged into master.", "updateAuthor": { "name": "kkolipaka", "key": "kkolipaka", "displayName": "Kondal Kolipaka", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-10T03:09:36.000+0000", "updated": "2015-09-10T03:09:36.000+0000" }, { "id": "367465", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nNo errors are seen using liveview if action bar is implements in the app.\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.3.3.201510201834\r\nTi SDK : 5.1.0.v20151020095222\r\nTi CLI : 5.0.5\r\nAlloy : 1.7.16\r\nMAC Yosemite : 10.10.5\r\nAppc NPM : 4.2.1-5\r\nAppc CLI : 5.1.0-38\r\nNode: v0.10.37\r\nNexus 5 - Android 6.0\r\nAndroid Emulator: android 4.4.4, android 4.1.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-21T22:39:36.000+0000", "updated": "2015-10-21T22:39:36.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }