Skip to content

Push notifications give 0 success, 0 failures #1731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
rogeriochaves opened this issue May 9, 2016 · 6 comments
Closed
3 tasks done

Push notifications give 0 success, 0 failures #1731

rogeriochaves opened this issue May 9, 2016 · 6 comments

Comments

@rogeriochaves
Copy link

rogeriochaves commented May 9, 2016

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?

@jgyeh
Copy link

jgyeh commented May 9, 2016

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.

@rogeriochaves
Copy link
Author

rogeriochaves commented May 10, 2016

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

image
image
image

Hmm apparently my device tokens are empty

@rogeriochaves
Copy link
Author

rogeriochaves commented May 10, 2016

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!

@aBuder
Copy link

aBuder commented Apr 25, 2017

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.

@rogeriochaves
Copy link
Author

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

@aBuder
Copy link

aBuder commented Apr 25, 2017

Can you share the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants