Skip to content

Sending a single Push creates multiple calls on server #453

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
alariju opened this issue Feb 16, 2016 · 3 comments
Closed

Sending a single Push creates multiple calls on server #453

alariju opened this issue Feb 16, 2016 · 3 comments
Labels
type:question Support or code-level question

Comments

@alariju
Copy link

alariju commented Feb 16, 2016

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?

@alariju alariju 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 Feb 16, 2016
@alariju alariju 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 Feb 16, 2016
@gfosco
Copy link
Contributor

gfosco commented Feb 16, 2016

How many records do you have in the _Installation class?

@wangmengyan95
Copy link
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.

@alariju
Copy link
Author

alariju commented Feb 16, 2016

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.

@alariju alariju closed this as completed Feb 17, 2016
@mtrezza mtrezza added type:question Support or code-level question and removed 🔧 troubleshooting labels Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

4 participants