Skip to content

Sending a single Push creates multiple calls on server #453

Closed

Description

@alariju

I've managed to send a Push Notifications with the parse-server. I did it testing from a curl and from a custom function that I made. The push arrives correctly to the device (iPhone), but the thing is that if I do a heroku logs -t, looks like it tries like a million times to send the push.

This is the curl:

curl -X POST -H "X-Parse-Application-Id: myAppId" -H "X-Parse-Master-Key: myMasterKey" -H "Content-Type: application/json" -d '{ "where": { "deviceType": { "$in": [ "ios" ] } }, "data": { "title": "Push Test", "alert": "Push text!" } }' https://myApp.herokuapp.com/parse/push

And this is part of the heroku logs -t output:

APNS can not find vaild connection for {"type":"Buffer","data":[141,96,134,253,21,125,236,237,41,234,101,239,35,114,182,175,225,46,234,42,130,40,96,39,33,2,25,1,96,53,87,86]}
APNS Connection 0 Disconnected
APNS Connection 0 Connected

That keeps coming out over and over again among other things, but it's always printing the same output. It's normal?

Activity

  1. changed the title [-]Push Notifications does multiple calls[/-] [+]Sending a single Push makes the server to try like a million times to finally send it[/+] on Feb 16, 2016
  2. changed the title [-]Sending a single Push makes the server to try like a million times to finally send it[/-] [+]Sending a single Push creates multiple calls on server[/+] on Feb 16, 2016
  3. gfosco commented on Feb 16, 2016

    @gfosco
    Contributor

    How many records do you have in the _Installation class?

  4. wangmengyan95 commented on Feb 16, 2016

    @wangmengyan95
    Contributor

    Hi @alariju, most of time this means some of your installations' deviceToken is not valid. As we mentioned in wiki, we do not have error handling yet. If your device can receive the notification in the end, you can ignore it right now, we will add the error handling later.

  5. alariju commented on Feb 16, 2016

    @alariju
    Author

    Thanks for the replies.

    @gfosco I had multiple records on _Installation class. I guess the server was iterating over all records (I migrated the _Installation class from Parse to a mongolab database.), so thats the reason all the errors were coming out in console.

    @wangmengyan95 Ok, I'll be waiting for that error handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions