{ "id": "132152", "key": "TIMOB-17195", "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": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-23T23:13:08.000+0000", "created": "2014-06-23T22:12:03.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "analytics", "module_analytics", "qe-3.3.0", "qe-testadded" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-07-28T20:54:14.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": "App crash, when analytics set to false.\r\napp.js\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\nvar startDate = new Date();\r\nif (Ti.UI.Android){win.windowSoftInputMode = Ti.UI.Android.SOFT_INPUT_ADJUST_PAN;}\r\n\r\nfunction timeOut(){setTimeout(function(){if(Ti.Platform.osname == 'ios' || 'android'){label.text = Ti.Analytics.lastEvent;}},1000);}\r\n\r\nfunction createRow(i) {\r\n var row = Ti.UI.createView({backgroundColor: 'white', width:'100%', height: '10%', top: 5, left: 0});\r\n return row;\r\n}\r\n\r\nvar column1 = Ti.UI.createView({top: 0, left: 0, layout: 'vertical', height:\"60%\", width:'33%'});\r\nvar column2 = Ti.UI.createView({top: 0, layout: 'vertical', height:\"60%\", width:'33%'});\r\nvar column3 = Ti.UI.createView({top: 0, right: 0, layout: 'vertical', height:\"60%\", width:'33%'});\r\nif(Ti.Platform.osname == 'android'){\r\n\tvar label = Ti.UI.createLabel({backgroundColor:'#FFF', color:'black', textAlign: 'center', bottom:0, width: '98%', height:'40%'});}\r\nelse{\r\n\tvar label = Ti.UI.createLabel({backgroundColor:'#FFF', color:'black', font: {fontSize: 11}, textAlign: 'center', bottom:0, width: '98%', height:'40%'});}\r\nvar border = Ti.UI.createLabel({top:0, height:'1', borderColor:'#EEE', width: Titanium.UI.FILL});\r\nvar deprecated = Ti.UI.createLabel({backgroundColor:'#FFF', color:'red', textAlign: 'center', bottom:0, width: Titanium.UI.FILL});\r\n\r\n//Testing the Ti.Analytics.addEvent\r\nvar testOneButton = Ti.UI.createButton({title: \"addEvent\", height: '33%', color:'red', width: '100%', top: 0});\r\ntestOneButton.addEventListener('click', function(e){\r\n\tTi.Analytics.addEvent('addEventOne', 'addEventTwo', 'addEvent.testButton');\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Add Event\"; }\r\n\tdeprecated.setText(\"Deprecated 2.0.0\");\r\n\twin.add(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.getLastEvent\r\nvar testTwoButton = Ti.UI.createButton({title: \"getLastEvent\", height: '33%', width: '100%', top: 0});\r\ntestTwoButton.addEventListener('click', function(e){\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Get Last Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.getBubbleParent\r\nvar testThreeButton = Ti.UI.createButton({title: \"getBubble\", height: '33%', width: '100%', top: 0});\r\ntestThreeButton.addEventListener('click', function(e){\r\n\tTi.Analytics.getBubbleParent();\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Get Bubble Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.featureEvent\r\nvar testFourButton = Ti.UI.createButton({title: \"featureEvent\", height: '33%', width: '100%', top: 0});\r\ntestFourButton.addEventListener('click', function(e){\r\n\tTi.Analytics.featureEvent('featureEvent', {\"value1\":\"key1\"});\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Feature Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.navEvent\r\nvar testFiveButton = Ti.UI.createButton({title: \"navEvent\", height: '33%', width: '100%', top: 0});\r\ntestFiveButton.addEventListener('click', function(e){\r\n\tTi.Analytics.navEvent('navEventOne', 'navEventTwo', 'navEvent.testButton');\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Navigation Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.timedEvent\r\nvar testSixButton = Ti.UI.createButton({title: \"timedEvent\", height: '33%', color:'red', width: '100%', top: 0});\r\ntestSixButton.addEventListener('click', function(e){\r\n\tvar stopDate = new Date();\r\n\tvar duration = stopDate - startDate;\r\n\tTi.Analytics.timedEvent('timedEvent.testButton', startDate, stopDate, duration);\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Timed Event\"; }\r\n\tdeprecated.setText(\"Deprecated 2.0.0\");\r\n\twin.add(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.settingsEvent\r\nvar testSevenButton = Ti.UI.createButton({title: \"settingsEvent\", height: '33%', color:'red', width: '100%', top: 0});\r\ntestSevenButton.addEventListener('click', function(e){\r\n\tTi.Analytics.settingsEvent('settingsEvent', 'settingsEvent.testButton');\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Settings Event\"; }\r\n\tdeprecated.setText(\"Deprecated 2.0.0\");\r\n\twin.add(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.userEvent\r\nvar testEightButton = Ti.UI.createButton({title: \"userEvent\", height: '33%', color:'red', width: '100%', top: 0});\r\ntestEightButton.addEventListener('click', function(e){\r\n\tTi.Analytics.userEvent('userEvent', 'userEvent.testButton');\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"User Event\"; }\r\n\tdeprecated.setText(\"Deprecated 2.0.0\");\r\n\twin.add(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.setBubbleParent\r\nvar testNineButton = Ti.UI.createButton({title: \"setBubble\", height: '33%', width: '100%', top: 0});\r\ntestNineButton.addEventListener('click', function(e){\r\n\tTi.Analytics.setBubbleParent(true);\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Set Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\ncolumn1.add(testOneButton);\r\ncolumn1.add(testTwoButton);\r\nif(Ti.Platform.osname != 'mobileweb'){\r\n\tcolumn1.add(testThreeButton);\r\n}\r\n\r\ncolumn2.add(testFourButton);\r\ncolumn2.add(testFiveButton);\r\ncolumn2.add(testSixButton);\r\n\r\ncolumn3.add(testSevenButton);\r\ncolumn3.add(testEightButton);\r\nif(Ti.Platform.osname != 'mobileweb'){\r\n\tcolumn3.add(testNineButton);\r\n}\r\nif(Ti.Platform.osname != 'mobileweb'){ label.text = Ti.Analytics.lastEvent; }\r\nlabel.add(border);\r\nwin.add(column1);\r\nwin.add(column2);\r\nwin.add(column3);\r\nwin.add(label);\r\nwin.open();\r\n{code}\r\n\r\nh5. To reproduce\r\n1. Modify tiapp.xml and change analytics to false \r\n2. Recompile the application and install to device \r\n3. Tail the analytics server \r\n4. Launch the application\r\n5. Click featureEvent and navEvent\r\n\r\nh5. Actual result\r\ncrash\r\n{code}\r\n[ERROR] The application has crashed with an uncaught exception 'apsanalytics.exception.notenabled'.\r\n\tReason:\r\n\tAPSAnalytics has not been enabled. Call `enableWithAppKey:andDeployType:` to enable service.\r\n{code}\r\nh5. Expected result\r\nShould not see any analytics sent\r\n", "attachment": [ { "id": "49219", "filename": "analytics_ios_crash.txt", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-23T22:12:03.000+0000", "size": 24493, "mimeType": "text/plain" } ], "flagged": false, "summary": "Analytics: iOS - The application has crashed with an uncaught exception 'apsanalytics.exception.notenabled'", "creator": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac osx 10.9.3 Mavericks\r\nAppcelerator Studio, build: 3.3.0.201406171619\r\nTitanium SDK, build: 3.3.0.v20140620194913\r\nNode.JS Version: v0.10.13 \r\nNPM Version: 1.3.2 \r\nacs@1.0.14 \r\nalloy@1.4.0-rc2\r\nnpm@1.3.2 \r\ntitanium@3.3.0-rc2 \r\ntitanium-code-processor@1.1.1\r\nDevice: iPhone5c iOS ", "closedSprints": [ { "id": 133, "state": "closed", "name": "2014 Sprint 13 SDK", "startDate": "2014-06-23T21:55:20.791Z", "endDate": "2014-07-04T00:00:00.000Z", "completeDate": "2014-07-07T17:32:18.561Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "310554", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FYI", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-23T22:13:43.000+0000", "updated": "2014-06-23T22:13:43.000+0000" }, { "id": "310559", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master : https://github.com/appcelerator/titanium_mobile/pull/5839\r\n3_3_X : https://github.com/appcelerator/titanium_mobile/pull/5840", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-23T22:32:58.000+0000", "updated": "2014-06-23T22:32:58.000+0000" }, { "id": "310698", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and verified the fix with:\r\nMac osx 10.9.3 Mavericks\r\nAppcelerator Studio, build: 3.3.0.201406231625\r\nTitanium SDK, build: 3.3.0.v20140623161712 \r\nNode.JS Version: v0.10.13 \r\nNPM Version: 1.3.2 \r\nacs@1.0.14 \r\nalloy@1.4.0-rc2\r\nnpm@1.3.2 \r\ntitanium@3.3.0-rc2 \r\ntitanium-code-processor@1.1.1\r\nDevice: iPhone5C iOS 7.1\r\n\r\nNo crash.", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-24T18:03:14.000+0000", "updated": "2014-06-24T18:03:14.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }