{"action":"opened","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/656","repository_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/656/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/656/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/656/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/656","id":137147433,"number":656,"title":"iOS App occasionally crashes from memory issues. PushPlugin times out.","user":{"login":"geooot","id":7832610,"avatar_url":"https://avatars.githubusercontent.com/u/7832610?v=3","gravatar_id":"","url":"https://api.github.com/users/geooot","html_url":"https://github.com/geooot","followers_url":"https://api.github.com/users/geooot/followers","following_url":"https://api.github.com/users/geooot/following{/other_user}","gists_url":"https://api.github.com/users/geooot/gists{/gist_id}","starred_url":"https://api.github.com/users/geooot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geooot/subscriptions","organizations_url":"https://api.github.com/users/geooot/orgs","repos_url":"https://api.github.com/users/geooot/repos","events_url":"https://api.github.com/users/geooot/events{/privacy}","received_events_url":"https://api.github.com/users/geooot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-29T04:30:10Z","updated_at":"2016-02-29T04:30:10Z","closed_at":null,"body":"When running my app with the plugin, sometimes it's unresponsive and seems to wait to wait for the PushPlugin to receive the registration key. It seems to happen more times than not.\r\n### Expected Behaviour\r\n```\r\n2016-02-28 22:12:52.895 Graded[1157:300727] [CDVTimer][TotalPluginStartup] 29.780984ms\r\n2016-02-28 22:12:52.913 Graded[1157:300727] active\r\n2016-02-28 22:12:52.913 Graded[1157:300727] PushPlugin skip clear badge\r\n2016-02-28 22:12:53.309 Graded[1157:300727] Resetting plugins due to page load.\r\n2016-02-28 22:12:54.298 Graded[1157:300816] Push Plugin register called\r\n2016-02-28 22:12:54.299 Graded[1157:300816] PushPlugin.register: setting badge to false\r\n2016-02-28 22:12:54.299 Graded[1157:300816] PushPlugin.register: clear badge is set to 0\r\n2016-02-28 22:12:54.299 Graded[1157:300816] PushPlugin.register: better button setup\r\n2016-02-28 22:12:54.299 Graded[1157:300816] GCM Sender ID <SENDER ID GOES HERE>\r\n2016-02-28 22:12:54.299 Graded[1157:300816] Using GCM Notification\r\n2016-02-28 22:12:54.301 Graded[1157:300816] Using GCM Sandbox\r\n2016-02-28 22:12:54.313 Graded[1157:300727] Push Plugin register success: <MEMORY ADDRESS?>\r\n2016-02-28 22:12:54.395 Graded[1157:300727] GCM Registration Token: <TOKEN>\r\n2016-02-28 22:12:55.118 Graded[1157:300727] Finished load of: <INDEX.HTML FILE PATH>\r\n```\r\n### Actual Behaviour (Notice the lack of other messages and Registration ID)\r\n```\r\n2016-02-28 22:06:28.242 Graded[1107:298489] [CDVTimer][TotalPluginStartup] 20.986021ms\r\n2016-02-28 22:06:28.253 Graded[1107:298489] active\r\n2016-02-28 22:06:28.253 Graded[1107:298489] PushPlugin skip clear badge\r\n2016-02-28 22:06:28.480 Graded[1107:298489] Resetting plugins due to page load.\r\n2016-02-28 22:07:08.343 Graded[1107:298489] Received memory warning.\r\n2016-02-28 22:07:08.364 Graded[1107:298489] Received memory warning.\r\n2016-02-28 22:07:08.982 Graded[1107:298489] Received memory warning.\r\nMessage from debugger: Terminated due to memory issue\r\n```\r\nThe used memory also steadily increases as this goes on until a memory problem occurs.\r\n\r\n#### Platform and Version \r\n\r\n- iOS 9.2\r\n- Cordova 6.0\r\n- phonegap-plugin-push 1.5.3\r\n\r\n#### Other Plugins\r\n```\r\ncordova-plugin-crosswalk-webview 1.3.1 \"Crosswalk WebView Engine\"\r\ncordova-plugin-dialogs 1.2.0 \"Notification\"\r\ncordova-plugin-network-information 1.2.0 \"Network Information\"\r\ncordova-plugin-statusbar 1.0.1 \"StatusBar\"\r\ncordova-plugin-whitelist 1.0.0 \"Whitelist\"\r\norg.apache.cordova.device 0.3.0 \"Device\"\r\nphonegap-plugin-push 1.5.3 \"PushPlugin\"\r\nsk.kcorp.cordova.ios-security 0.3.0 \"IOS Security\"\r\n```\r\n#### Sample Push Data Payload\r\n```python\r\nimport json\r\nimport requests\r\nbody = {\r\n    \"to\" : senderID,     \r\n    \"data\":{\r\n        \"message\":\"Open graded to see more\",\r\n        \"title\":\"You have 1 new assignments\",\r\n        \"priority\":\"high\",\r\n        \"style\":\"\",\r\n        \"image\":\"https://raw.githubusercontent.com/geooot/gradedapp/gh-pages/site/img/notification_info.png\",\r\n    }\r\n}\r\na = requests.post('https://android.googleapis.com/gcm/send',headers={'Authorization':'key= api_key,'Content-Type':'application/json'}, data=json.dumps(body))\r\nprint(a.text)\r\n```\r\n#### JavaScript PushPlugin initialization\r\n\r\n```javascript\r\n    push = PushNotification.init({\r\n            \"android\": {\"senderID\": senderID},\r\n            \"ios\": {\"alert\": true, \"badge\": true, \"sound\": true,\"senderID\":senderID,gcmSandbox: true},\r\n            \"windows\": {}\r\n    } );\r\n    push.on('registration', function(data) {\r\n             //$.post( \"http://requestb.in/wgyo2uwg\", { id:data.registrationId } );\r\n             localStorage.setItem('pushID',data.registrationId);\r\n    });\r\n    push.on('notification', function(data) {\r\n             alert('got notification');\r\n    });\r\n```"}}