{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/942","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/942/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/942/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/942/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/942","id":139728955,"number":942,"title":"Push notification doesn't get to the device","user":{"login":"weengo","id":10067015,"avatar_url":"https://avatars.githubusercontent.com/u/10067015?v=3","gravatar_id":"","url":"https://api.github.com/users/weengo","html_url":"https://github.com/weengo","followers_url":"https://api.github.com/users/weengo/followers","following_url":"https://api.github.com/users/weengo/following{/other_user}","gists_url":"https://api.github.com/users/weengo/gists{/gist_id}","starred_url":"https://api.github.com/users/weengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weengo/subscriptions","organizations_url":"https://api.github.com/users/weengo/orgs","repos_url":"https://api.github.com/users/weengo/repos","events_url":"https://api.github.com/users/weengo/events{/privacy}","received_events_url":"https://api.github.com/users/weengo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":66,"created_at":"2016-03-09T23:04:19Z","updated_at":"2016-04-20T10:50:27Z","closed_at":"2016-03-10T15:26:10Z","body":"**Issue**\r\nOn Cloud Code I have an after save trigger that sends a Push to a specific user, but it doesn't get to the device and I neither get a **GCM request and response**. Any ideas?\r\n\r\n**Prerequisites** \r\n- I've migrated to AWS Elastic Beanstalk(64bit Amazon Linux 2015.09 v2.0.7, running Node.js 4.2.3) and MongoLab\r\n- I'm running the 2.1.4 of Parse Server.\r\n- I'm testing on Android SDK\r\n- I've followed everything on Push tutorial [here](https://github.com/ParsePlatform/parse-server/wiki/Push)\r\n\r\n**Log from Verbose**\r\n```\r\nPOST /parse/push { host: 'parseserver-xxx-env.elasticbeanstalk.com',\r\n  'x-real-ip': 'xxx',\r\n  'x-forwarded-for': 'xxx',\r\n  'content-length': '406',\r\n  accept: '*/*',\r\n  'content-type': 'text/plain',\r\n  'user-agent': 'node-XMLHttpRequest, Parse/js1.7.1 (NodeJS 4.3.0)',\r\n  'x-forwarded-port': '80',\r\n  'x-forwarded-proto': 'http' } {\r\n  \"where\": {\r\n    \"user\": {\r\n      \"__type\": \"Pointer\",\r\n      \"className\": \"_User\",\r\n      \"objectId\": \"xxxxx\"\r\n    }\r\n  },\r\n  \"data\": {\r\n    \"alert\": \"Bla bla bla\",\r\n    \"badge\": \"Increment\",\r\n    \"uri\": \"com.xxxx.xxxx://xxxx?id=xxxxx\",\r\n    \"p\": \"xxxxxx\"\r\n  }\r\n}\r\nresponse: {\r\n  \"response\": {\r\n    \"result\": true\r\n  }\r\n}\r\nPush to user: xxxxx was successful\r\n```\r\n**How I initialise Parse Server on index.js** \r\n```\r\nvar api = new ParseServer({\r\n  databaseURI: databaseUri || 'mongodb://localhost:27017/test',\r\n  cloud: process.env.PARSE_SERVER_CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',\r\n  appId: 'xxxxxxx',\r\n  masterKey: 'xxxxxxx',\r\n  fileKey: process.env.PARSE_SERVER_FILE_KEY || 'xxxxxxx',\r\n  facebookAppIds: ['xxxxxxx'],\r\n  serverURL: 'http://parseserver-xxxxx-env.elasticbeanstalk.com/parse/', \r\n  filesAdapter: new S3Adapter(\r\n    \"xxxxxxx\",\r\n    \"xxxxxxx\",\r\n    \"xxxxxxx\",\r\n    {directAccess: true}\r\n  ), \r\n  push: {\r\n      android: {\r\n        senderId: 'xxxxxxx',\r\n        apiKey: 'xxxxxxx'\r\n      },\r\n      ios: {\r\n        pfx: __dirname + '/development.p12',\r\n        bundleId: 'com.xxxxxxx.xxxxxxx',\r\n        production: false\r\n      },\r\n      ios: {\r\n        pfx: __dirname + '/production.p12',\r\n        bundleId: 'com.xxxxxxx.xxxxxxx',\r\n        production: true\r\n      }\r\n  }\r\n});\r\n```\r\n**Function on Cloud Code**\r\n```\r\nvar pushQuery = new Parse.Query(Parse.Installation);\r\n        pushQuery.equalTo('user', user);\r\n        Parse.Push.send({\r\n            where: pushQuery,\r\n            data: {\r\n              alert: \"Bla bla bla\",\r\n              badge: \"Increment\",\r\n              uri: \"com.xxxx.xxxx://xxxx?id=\" + offer.id,\r\n              p: offer.id\r\n            }\r\n            }, {useMasterKey: true}).then(function (result) {\r\n              console.log(\"Push to user: \" + user.id + \" was successful\");\r\n            },\r\n            function(error) {\r\n              console.log(\"Error sending push: \" + error.code + \" - \" + error.message);\r\n            }\r\n        );\r\n```\r\n**Possible Similar Issues**\r\n- #401 "},"comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments/212378219","html_url":"https://github.com/ParsePlatform/parse-server/issues/942#issuecomment-212378219","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/942","id":212378219,"user":{"login":"sekharrockz","id":5896836,"avatar_url":"https://avatars.githubusercontent.com/u/5896836?v=3","gravatar_id":"","url":"https://api.github.com/users/sekharrockz","html_url":"https://github.com/sekharrockz","followers_url":"https://api.github.com/users/sekharrockz/followers","following_url":"https://api.github.com/users/sekharrockz/following{/other_user}","gists_url":"https://api.github.com/users/sekharrockz/gists{/gist_id}","starred_url":"https://api.github.com/users/sekharrockz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sekharrockz/subscriptions","organizations_url":"https://api.github.com/users/sekharrockz/orgs","repos_url":"https://api.github.com/users/sekharrockz/repos","events_url":"https://api.github.com/users/sekharrockz/events{/privacy}","received_events_url":"https://api.github.com/users/sekharrockz/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T10:50:27Z","updated_at":"2016-04-20T10:50:27Z","body":"@Heman6886 \r\nOne more thing, we need not call push only from cloud code. we can also call from rest api's as well. "}}