{ "id": "159540", "key": "AC-3499", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2016-04-21T20:44:01.000+0000", "created": "2016-04-13T08:08:14.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-04-21T20:44:01.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": [], "description": "Development build is working fine. I am including google play services in the build. But distribution build is crashing on Android devices. I tried to narrow down the problem and found that there is problem in the ti.cloud module where we are calling function subscribe token.\r\n\r\nCode of this function is like :\r\n\r\nvar Cloud = require('ti.cloud');\r\n\r\n\t\t// subscribe to channel\r\n\t\tCloud.PushNotifications.subscribeToken({\r\n\t\t\tdevice_token : deviceToken,\r\n\t\t\tchannel : 'test123',\r\n\t\t\ttype : osname\r\n\t\t}, function(e) {\r\n\t\t\tif (e.success) {\r\n\t\t\t\t// Call for register device function\r\n\r\n\t\t\t} else {\r\n\t\t\t\t//display error\r\n\t\t\t}\r\n\t\t});\r\n\r\nPFA file for environment details of machine and crash logs. ", "attachment": [ { "id": "58937", "filename": "crashLogs", "author": { "name": "akashsalunkhe", "key": "akashsalunkhe", "displayName": "Akash Salunkhe", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-04-13T07:56:20.000+0000", "size": 107534, "mimeType": "text/html" }, { "id": "58938", "filename": "environementDetails.txt", "author": { "name": "akashsalunkhe", "key": "akashsalunkhe", "displayName": "Akash Salunkhe", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-04-13T07:23:36.000+0000", "size": 3592, "mimeType": "text/plain" } ], "flagged": false, "summary": "Application is crashing because of ti.cloud module when we create distribution build for Android.", "creator": { "name": "akashsalunkhe", "key": "akashsalunkhe", "displayName": "Akash Salunkhe", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "akashsalunkhe", "key": "akashsalunkhe", "displayName": "Akash Salunkhe", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Affected version: Appcelerator SDK 4.0.0.GA", "comment": { "comments": [ { "id": "382728", "author": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\nI am not able to reproduce this issue. I am able to make the app run with both development build and distribution build while using ti.cloud module with the given code. \r\n*Steps:*\r\n1. Create a default alloy project for Android with Appcelerator Cloud service enabled.\r\n2. Replace the code in app.js file with the following code.\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\nwin1.open();\r\n\r\nvar Cloud = require('ti.cloud');\r\n\r\nvar deviceToken;\r\n\r\n\r\nCloud.PushNotifications.subscribeToken({\r\n\tdevice_token : deviceToken,\r\n\tchannel : 'test123',\r\n\ttype: Ti.Platform.name == 'android' ? 'android' : 'ios'\r\n}, function(e) {\r\n\tif (e.success) {\r\n\t\talert('Success' );\r\n\t} else {\r\n\t\talert('Error' );;\r\n\t}\r\n\r\n});\r\n\r\n\r\n\r\n{code}\r\n3. Create a signed apk from the option \"Publish-Distribute\".\r\n4. Install the apk on Android device and run the app. >> an alert is created.\r\n\r\n[Screenshot|http://s22.postimg.org/xli70akb5/image.png]\r\n\r\nSubscribe token does not get successful in my case for obvious reason. Thing to consider here is the app does not get crashed and no error log is produced.\r\n\r\nThanks\r\n\r\n\r\n*Environment*:\r\n\r\n*Device info:* Nexus7 (android 6.0.1)\r\n*Node.js Version:* 0.12.7\r\n*npm Version:* 2.11.3\r\n*Titanium SDKs:* 5.2.2.GA and 5.2.1.GA\r\n*Java Development Kit Version:* 1.8.0_73\r\n*Titanium CLI Version:* 5.0.5\r\n*Appcelerator CLI Version:* 5.2.2\r\n*Appcelerator Studio:* 4.4.0.201511241829", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-04-14T11:32:04.000+0000", "updated": "2016-04-19T21:41:03.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }