Parse-server: Push notifications give 0 success, 0 failures

Created on 9 May 2016  路  6Comments  路  Source: parse-community/parse-server

push: {
    android: {
      senderId: '[secret]',
      apiKey: '[secret]'
    },
    ios: [{
      pfx: __dirname + '/certs/Prod.p12',
      bundleId: '[secret]',
      production: true
    },
    {
      pfx: __dirname + '/certs/Dev.p12',
      bundleId: '[secret]',
      production: false
    }]
  }

I'm using this curl:

curl -X POST \
  -H "X-Parse-Application-Id: [secret]" \
  -H "X-Parse-Master-Key: [secret]" \
  -H "Content-Type: application/json" \
  -d '{
        "where": {
          "deviceType": "ios"
        },
        "data": {
          "alert": "Hello World!"
        }
      }' \
  http://localhost:1337/parse/push

And by enabling VERBOSE=1 I'm getting:

verbose: POST /parse/push { host: 'localhost:1337',
  'user-agent': 'curl/7.43.0',
  accept: '*/*',
  'x-parse-application-id': '[secret]',
  'x-parse-master-key': '[secret]',
  'content-type': 'application/json',
  'content-length': '131' } {
  "where": {
    "deviceType": "ios"
  },
  "data": {
    "alert": "Hello World!"
  }
}
verbose: {
  "headers": {
    "X-Parse-Push-Status-Id": "z50b72vAxW"
  },
  "response": {
    "result": true
  }
}
verbose: sending push to 1 installations
verbose: sent push! 0 success, 0 failures

I don't know why my pushs aren't being sent, but this message should show either 1 success or 1 failure right?

All 6 comments

Have you tried sending a test push notification through the parse dashboard? We're also having issues with push notifications. We couldn't get our in app pushes to deliver through the API or through the dashboard. No errors, just pushes not being delivered.

@jgyeh yeah, also getting 0 deliveries from parse.com ):

image
image
image

Hmm apparently my device tokens are empty

After enabling the push capability on xcode (it should have been enabled already, because it was working before, idk what happened) and copying the new swift code on parse.com tutorial (here) it worked, thanks!

Hi @rogeriochaves,

how do you fix the problem? I have also the same problem, sent and deliver is 0, but push notifications are received on iOS device.

@aBuder sorry, I don't remember, it was a long time ago ):

Can you share the code?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dovewi picture dovewi  路  3Comments

omyen picture omyen  路  3Comments

dcdspace picture dcdspace  路  3Comments

carjo422 picture carjo422  路  3Comments

ViolentCrumble picture ViolentCrumble  路  3Comments