Hi i have self hosted parse server on digital ocean, it is sending notifications on iOS but not on android. my index.js file looks like this:
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://1.1.1.1"1/app_name',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: 'abc',
masterKey: 'def',
serverURL: 'http://1.1.1.1:1337/parse' || 'http://localhost:1337/parse',
verbose: true,
push: {
android:{
senderId: 'my FCM id',
apiKey: 'my FCM key'
},
ios: {
pfx: '1',
bundleId: '2',
production: true
}
}
});
when i send a push from the parse dashboard (also self hosted), this is the response i get with verbose:true:
"results": [
{
"objectId": "bNtZqwY8",
"pushTime": "2017-06-13T10:49:06.095Z",
"query": "{\"UniqueId\":\"c49de788ce\",\"deviceType\":{\"$in\":[\"android\"]}}",
"payload": "{\"alert\":\"Thank you for using my app.\"}",
"source": "rest",
"status": "succeeded",
"numSent": 0,
"pushHash": "266b6b637152b36040830",
"createdAt": "2017-06-13T10:49:06.095Z",
"updatedAt": "2017-06-13T10:49:06.214Z",
"numFailed": 15,
"failedPerType": {
"android": 15
},
"ACL": {}
},
{
"objectId": "rsYinvGG",
"pushTime": "2017-06-13T10:48:42.449Z",
"query": "{\"UniqueId\":\"7A0A-9AEA-5870FDEC42A3\"}",
"payload": "{\"alert\":\"one\",\"link_key\":1,\"sound\":\"default\"}",
"source": "rest",
"status": "succeeded",
"numSent": 2,
"pushHash": "246431e019c0357dcb180c7",
"createdAt": "2017-06-13T10:48:42.449Z",
"updatedAt": "2017-06-13T10:48:43.282Z",
"numFailed": 0,
"sentPerType": {
"ios": 2
},
"ACL": {}
},
When i send push on android from FCM, it works. Im really lost here with android push, can someone please point me in the right direction.
Here is the output from the log:
ESC[36mverboseESC[39m: REQUEST for [PUT] /parse/classes/_Installation /zKIp8LLOWr: {
"GCMSenderId":"diMV6Hm3j07dbqVPEsZRgqNzDo3YvA5zNdUmtO6Q4ka5ijRyyIRHiWCWOBVBDA22OIls-4bO06kxDPuOKFwJUZuMD3Xt41WuKUoOJwBlW7cKdqv9llj7Me0uiWFLWDwS7V",
"UniqueId": "a59020fff8ca30d00",
"appVersion": "2.3.3",
"objectId": "zKIp8LLOWr"
} method=PUT, url=/parse/classes/_Installation/zKIp8LLOWr, x-parse- app-display-version=2.3.3, x-parse-installation-id=29918e2f-8bbd-4ab7-975f-f854e1f43689, user-agent=Parse Android SDK 1.13.1 (com.mrfizzy/18) API Level 21, connection=Keep-Alive, accept-encoding=gzip, x-parse-os-version=5.0, x-parse-app-build-version=18, content-type=application/json, x-parse-client-key=, x-parse-client-version=a1.13.1, host=46.101.199.219:1337, content-length=245, x-parse-application-id=JHyfl9YhXCQ24r6J8ohdVlHLt1hfWhB4MF2jQAQn, GCMSenderId=diMV6HmLH3I:APA91bFQS4Sq9G5wlej07dbqVPEsZRgqNzDo3YvA5zNdUmtO6Q4ka5ijRyyIRHiWCWOBVBDA22OIls-4bO06kxDPuOKFwJUZuMD3Xt41WuKUoOJwBlW7cKdqv9llj7Me0uiWFLWDwS7V, UniqueId=a59020a48ca30d00, appVersion=2.3.3, objectId=zKIp8LLOWr
ESC[31merrorESC[39m: Error generating response. ParseError { code: 101, message: 'Object not found for update.' } code=101, message=Object not found for update.
[object Object]