Skip to content

Push notifications give 0 success, 0 failures #1731

Closed
@rogeriochaves

Description

@rogeriochaves

Environment Setup

  • Server: parse-server version 2.2.7, operating system: Mac OSX El Capitain, local
  • Database: MongoDB 3

Steps to reproduce

  • I'm trying to send an iOS push notification (haven't tested android yet), and it fails with no errors, here is my config:
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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions