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
APNS notification gives the wrong feedback #154
Comments
I figured out the cause of 'invalid token'. |
Yes I have exactly the same problem. Apple closes the connection after it sends an Invalid Token (8). In my apps I'm always sending notifications in a batch, and some tokens actually are sandbox tokens or invalid tokens. I'm afraid I need to switch to another gem. I think this issue is the same as these: |
@tritter Rpush should mark the rest of the batch as failed once the Invalid Token error is received. What do you see in the logs when the error is received? |
No he deletes all notifications! Note: I added the following in the initialiser:
I see some crash in the logs, maybe this is the problem?
LOGS:
|
notification_failed doesn't take an error argument, it'll always fail with that error. |
Yes! That looks like a stupid mistake -_- I'll redeploy and let you know if it will save the sandbox keyed notifications now. |
My current problem is that rpush is not receiving invalid token error at all. |
@jiajiawang maybe its the logger you're using? Did you change the default init file in some way? Here is mine
|
@ileitch My app just delivered another batch of notifications. There seems to be only one sandbox token left I didn't delete.
This was my log:
|
UPDATE: after removing this handler:
I am able to see the failed notification in the DB. @ileitch am I using the wrong callback to delete a delivered notification? I want to see only the failed ones not the successful delivered ones. |
Yes, I has the same isssue. I can't push any notification for apn (apple). |
@thiensubs Are you using 'Rpush.push'? |
No. I'm using rpush start. This is a deamon mode. This is message i looking On Saturday, June 20, 2015, Jiajia Wang notifications@github.com wrote:
-----------------------------------------------------------------------Chào |
I'm not seeing the log. |
This should now be fixed in master. I'll release a new version soon. |
Log says delivered but nothing arrives on the phone.
If I use the same certificate and device token in NWPusher, I will get 'APN invalid token'.
As the phone doesn't actually receive anything, I assume NWPusher is giving the right feedback.
Also this bad delivery will destroy all the following good deliveries.
When sending multiple notifications at once, a good delivery (valid token) in front of the bad delivery (invalid token) will be successfully delivered.
But if a good delivery is after the bad delivery, it won't be successfully delivered.
However the log still says delivered.
I'm using ruby 2.1.2, rpush 2.4.0.
The text was updated successfully, but these errors were encountered: