Description
I have managed to get push notifications working in a test app using Unity, Parse Server and Heroku, however when I try the same configuration in our actual game, the push notifications never come through.
I am running Parse Server 2.2.7 on Heroku with MongoDB, and the test app does not have anything that the main app is missing.
All other Parse functionality is working fine, even the installation is saved with a device token, however when I send a push notification if the device token was generated by the test app it works fine, but if it is using the token generated by our actual game I see this in the _PushStatus document in my DB, and it never gets through to the phone:
{
"_id": "uUrP5xF64W",
"pushTime": "2016-04-21T01:07:43.653Z",
"_created_at": {
"$date": "2016-04-21T01:07:43.653Z"
},
"query": "{}",
"payload": "{"alert":"Please work"}",
"source": "rest",
"status": "succeeded",
"numSent": 0,
"pushHash": "1c5dd358f9bd636feff13872764e096b",
"_wperm": [],
"_rperm": [],
"numFailed": 1,
"failedPerType": {
"android": 1
}
I can't figure out how to troubleshoot this, I need more than 'it failed for android' to try and debug this but I don't know where to look as there is nothing in the logs.
I tried going through this repo trying to figure out where 'numFailed' was incremented, and eventually dug all the way down to PushAdapter.js but had no luck finding any more information as to what determines whether the device token is valid or whatever is blocking it.
If I copy the device token from the test app to the install generated by the new app it all works fine as well, so it is definitely an issue with the way the device registers or the way the push notification is trying to be sent.
Would really appreciate any help on this as I am very stuck, just basically doing trial and error to see if stuff works at this point.