{ "id": "170705", "key": "AC-5484", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2018-02-05T21:07:44.000+0000", "created": "2018-01-03T06:35:18.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-02-05T21:07:44.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "when i try to send an IOS notification, it show this error status.\r\nException Type: APNS; Error Code: 2010; Error Message: Socket is closed; Catched Exception: Socket Closed", "attachment": [ { "id": "63877", "filename": "Screen Shot 2018-01-03 at 2.28.37 PM.png", "author": { "name": "lau.yikonn", "key": "lau.yikonn", "displayName": "lau.yikonn", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-03T06:34:21.000+0000", "size": 143577, "mimeType": "image/png" } ], "flagged": false, "summary": "Fail to sent ios notification.", "creator": { "name": "lau.yikonn", "key": "lau.yikonn", "displayName": "lau.yikonn", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lau.yikonn", "key": "lau.yikonn", "displayName": "lau.yikonn", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "432660", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~lau.yikonn],\r\nThanks for sharing with us. Can you please share your sample code and environment details here so that we can reproduce the issue on our end?\r\n\r\nBest", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-01-03T08:04:38.000+0000", "updated": "2018-01-03T08:04:38.000+0000" }, { "id": "432712", "author": { "name": "lau.yikonn", "key": "lau.yikonn", "displayName": "lau.yikonn", "active": true, "timeZone": "America/Los_Angeles" }, "body": "var Cloud = require('ti.cloud'); \r\nvar app_status;\r\n\r\nif(Ti.Platform.osname == \"android\"){ \r\n\tvar CloudPush = require('ti.cloudpush'); \r\n\tCloudPush.addEventListener('callback', function (evt) { \r\n\t\tvar payload = JSON.parse(evt.payload); \r\n\r\n\t\tTi.App.Payload = payload;\r\n\t\t// if trayClickLaunchedApp or trayClickFocusedApp set redirect as true\r\n\t\tconsole.log(\"callback push\");\r\n\t\t\r\n\t});\r\n\t\r\n\tCloudPush.addEventListener('trayClickLaunchedApp', function (evt) {\r\n\t\tvar payload = JSON.parse(evt.payload); \r\n\t\treceivePush(payload);\r\n\t\tconsole.log('Tray Click Launched App (app was not running)');\r\n\t\t\r\n\t\tapp_status = \"not_running\"; \r\n\t //getNotificationNumber(Ti.App.Payload); \r\n\t});\r\n\tCloudPush.addEventListener('trayClickFocusedApp', function (evt) {\r\n\t\tvar payload = JSON.parse(evt.payload); \r\n\t\tconsole.log('Tray Click Focused App (app was already running)');\r\n\t\treceivePush(payload);\r\n\t\tapp_status = \"running\"; \r\n\t});\r\n}\r\n\r\nfunction getNotificationNumber(payload){ \r\n\tconsole.log(payload);\r\n}\r\n\t\r\n// Process incoming push notifications\r\nfunction receivePush(e) { \r\n\tconsole.log(e);\r\n\tconsole.log('receive push');\r\n\tif(OS_IOS){\r\n\t\tif(e.data.target == \"chatroom\"){\r\n\t\t\t\r\n\t\t}\r\n\t}else{\r\n\t\tif(e.target == \"chatroom\"){\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\t//Action after receiving push message\r\n\t \r\n\treturn false;\r\n}\r\n\r\nfunction deviceTokenSuccess(ex) {\r\n\tconsole.log(\"deviceTokenSuccess\");\r\n deviceToken = ex.deviceToken;\r\n \r\n\tCloud.PushNotifications.subscribeToken({\r\n\t channel: 'general',\r\n\t type:Ti.Platform.name == 'android' ? 'android' : 'ios', \r\n\t device_token: deviceToken\r\n\t}, function (sub) { \r\n\t\tconsole.log(sub);\r\n\t if (sub.success) { \r\n\t \t/** User device token**/\r\n\t \tconsole.log(deviceToken+\" push\");\r\n \t\tTi.App.Properties.setString('deviceToken', deviceToken); \r\n\t }\r\n\t});\r\n}\r\nfunction deviceTokenError(e) {\r\n alert('Failed to register for push notifications! ' + e.error);\r\n}\r\n\r\nfunction registerPush(){\r\n\tif (Ti.Platform.name == \"iPhone OS\" && parseInt(Ti.Platform.version.split(\".\")[0]) >= 8) {\r\n \r\n\t // Wait for user settings to be registered before registering for push notifications\r\n\t Ti.App.iOS.addEventListener('usernotificationsettings', function registerForPush() {\r\n\t \r\n\t // Remove event listener once registered for push notifications\r\n\t Ti.App.iOS.removeEventListener('usernotificationsettings', registerForPush); \r\n\t \r\n\t Ti.Network.registerForPushNotifications({\r\n\t success: deviceTokenSuccess,\r\n\t error: deviceTokenError,\r\n\t callback: receivePush\r\n\t });\r\n\t });\r\n\t \r\n\t // Register notification types to use\r\n\t Ti.App.iOS.registerUserNotificationSettings({\r\n\t\t types: [\r\n\t Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT,\r\n\t Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND,\r\n\t Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE\r\n\t ]\r\n\t });\r\n\t}else if(Ti.Platform.osname == \"android\"){\r\n\t\tCloudPush.retrieveDeviceToken({\r\n\t\t success: deviceTokenSuccess,\r\n\t\t error: deviceTokenError\r\n\t\t});\r\n\t}else{\r\n\t\tTitanium.Network.registerForPushNotifications({\r\n\t\t types: [\r\n\t\t Titanium.Network.NOTIFICATION_TYPE_BADGE,\r\n\t\t Titanium.Network.NOTIFICATION_TYPE_ALERT,\r\n\t\t Titanium.Network.NOTIFICATION_TYPE_SOUND\r\n\t\t ],\r\n\t\t\tsuccess:deviceTokenSuccess,\r\n\t\t\terror:deviceTokenError,\r\n\t\t\tcallback:receivePush\r\n\t\t});\r\n\t}\r\n}\r\n\r\nregisterPush();", "updateAuthor": { "name": "lau.yikonn", "key": "lau.yikonn", "displayName": "lau.yikonn", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-04T02:42:05.000+0000", "updated": "2018-01-04T02:42:05.000+0000" }, { "id": "432713", "author": { "name": "lau.yikonn", "key": "lau.yikonn", "displayName": "lau.yikonn", "active": true, "timeZone": "America/Los_Angeles" }, "body": "im using the axway platform to send to all user. \r\n", "updateAuthor": { "name": "lau.yikonn", "key": "lau.yikonn", "displayName": "lau.yikonn", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-04T02:43:32.000+0000", "updated": "2018-01-04T02:43:32.000+0000" }, { "id": "432727", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "[~lau.yikonn] Can you change this line of code?\r\n\r\n- if (Ti.Platform.name == \"iPhone OS\" && parseInt(Ti.Platform.version.split(\".\")[0]) >= 8)\r\n\r\nAnd use this\r\n\r\n- if ((Ti.Platform.osname === 'iphone' || Ti.Platform.osname === 'ipad' || Ti.Platform.osname === 'ipod') && parseInt(Ti.Platform.version.split(\".\")[0]) >= 8)\r\n\r\nFinally, delete the App from the device then reinstall it. Make sure the device has been subscribed successfully on the dashboard. Then send the push again.\r\n\r\nHope this helps.", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-01-04T06:42:09.000+0000", "updated": "2018-01-04T06:42:09.000+0000" }, { "id": "432783", "author": { "name": "lau.yikonn", "key": "lau.yikonn", "displayName": "lau.yikonn", "active": true, "timeZone": "America/Los_Angeles" }, "body": "it is not related with the code. i ask my friend to setup ios push notification at his appcelerator platform account. and then everything work fine. i think is something wrong with the configuration at platform there.", "updateAuthor": { "name": "lau.yikonn", "key": "lau.yikonn", "displayName": "lau.yikonn", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-05T11:34:31.000+0000", "updated": "2018-01-05T11:34:31.000+0000" }, { "id": "432861", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, can you try configuring a new sample app and try sending push in there? Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-08T18:22:33.000+0000", "updated": "2018-01-08T18:22:33.000+0000" }, { "id": "433877", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~lau.yikonn],
\r\nJust passing a followup here.Are you able to get that sorted out?  Please let us know if you need more help with this issue.\r\nRegards
\r\nAxway Appcelerator Support\r\n", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-01-31T11:36:33.000+0000", "updated": "2018-01-31T11:36:33.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }