Skip to content
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

Rpush::DeliveryError after a while #159

Closed
falcu opened this issue May 30, 2015 · 13 comments
Closed

Rpush::DeliveryError after a while #159

falcu opened this issue May 30, 2015 · 13 comments

Comments

@falcu
Copy link

falcu commented May 30, 2015

I have Rpush.embed on my config.ru.
When I deploy the app it works fine but after a while I get DeliveryError for all my notifications.

App 2983 stderr: [2015-05-30 22:41:54] [ERROR] Rpush::DeliveryError, Unable to deliver notification 17, received error (Failed to deliver to recipients . Errors: .)
App 2983 stderr: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rpush-2.2.0/lib/rpush/daemon/gcm/delivery.rb:87:in `handle_failures'
App 2983 stderr: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rpush-2.2.0/lib/rpush/daemon/gcm/delivery.rb:54:in`ok'
App 2983 stderr: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rpush-2.2.0/lib/rpush/daemon/gcm/delivery.rb:34:in `handle_response'
App 2983 stderr: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rpush-2.2.0/lib/rpush/daemon/gcm/delivery.rb:21:in`perform'
App 2983 stderr: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rpush-2.2.0/lib/rpush/daemon/dispatcher/http.rb:12:in `dispatch'
App 2983 stderr: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rpush-2.2.0/lib/rpush/daemon/dispatcher_loop.rb:61:in`dispatch'
App 2983 stderr: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rpush-2.2.0/lib/rpush/daemon/dispatcher_loop.rb:35:in `block (2 levels) in start'
App 2983 stderr: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rpush-2.2.0/lib/rpush/daemon/dispatcher_loop.rb:25:in`loop'
App 2983 stderr: /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rpush-2.2.0/lib/rpush/daemon/dispatcher_loop.rb:25:in `block in start'

Any idea?
Thanks

@falcu
Copy link
Author

falcu commented May 30, 2015

If after it stops working I re-deploy the app , the notifications are sent(old & new ones). But only for a while, after 15 minutes I get the DeliveryError again

@pratibha-spa
Copy link

I am facing the same issue. Did you find the solution ?

@ileitch
Copy link
Member

ileitch commented Jul 15, 2015

Can you please try master?

@pratibha-spa
Copy link

I didn't get you. Could you please elaborate what do you mean by "try master".

@ileitch
Copy link
Member

ileitch commented Jul 15, 2015

Change your Gemfile to: gem 'rpush', github: 'rpush/rpush'
then bundle update rpush

@pratibha-spa
Copy link

At the time of deployment using capistrano 3, i am getting this error
DEBUG [0fd41b42] [2015-07-15 17:21:30] [rpush] [TravelSafe] Starting 1 dispatcher...
DEBUG [0fd41b42] ✔
DEBUG [0fd41b42]
DEBUG [0fd41b42] [2015-07-15 17:21:30] [rpush] Rpush operational.
DEBUG [0fd41b42]
DEBUG [0fd41b42] [2015-07-15 17:22:31] [rpush] Shutting down...

@ypodo
Copy link

ypodo commented Jan 15, 2016

Hi,
I am facing same issue.

  • Booting Rails 'development' environment... ✔
    [2016-01-15 22:04:58] [android_app] Starting 1 dispatcher... ✔
    [2016-01-15 22:04:58] [android_app_2] Starting 1 dispatcher... ✔
    [2016-01-15 22:04:58] [ERROR] Rpush::DeliveryError, Unable to deliver notification 24, received error (Failed to deliver to all recipients. Errors: MismatchSenderId.)
    /home/yuris/.rvm/gems/ruby-2.2.3/bundler/gems/rpush-0237e42b42ca/lib/rpush/daemon/gcm/delivery.rb:89:in handle_failures' /home/yuris/.rvm/gems/ruby-2.2.3/bundler/gems/rpush-0237e42b42ca/lib/rpush/daemon/gcm/delivery.rb:56:inok'
    /home/yuris/.rvm/gems/ruby-2.2.3/bundler/gems/rpush-0237e42b42ca/lib/rpush/daemon/gcm/delivery.rb:37:in handle_response' /home/yuris/.rvm/gems/ruby-2.2.3/bundler/gems/rpush-0237e42b42ca/lib/rpush/daemon/gcm/delivery.rb:21:inperform'
    /home/yuris/.rvm/gems/ruby-2.2.3/bundler/gems/rpush-0237e42b42ca/lib/rpush/daemon/dispatcher/http.rb:12:in dispatch' /home/yuris/.rvm/gems/ruby-2.2.3/bundler/gems/rpush-0237e42b42ca/lib/rpush/daemon/dispatcher_loop.rb:66:indispatch'
    /home/yuris/.rvm/gems/ruby-2.2.3/bundler/gems/rpush-0237e42b42ca/lib/rpush/daemon/dispatcher_loop.rb:35:in block (2 levels) in start' /home/yuris/.rvm/gems/ruby-2.2.3/bundler/gems/rpush-0237e42b42ca/lib/rpush/daemon/dispatcher_loop.rb:25:inloop'
    /home/yuris/.rvm/gems/ruby-2.2.3/bundler/gems/rpush-0237e42b42ca/lib/rpush/daemon/dispatcher_loop.rb:25:in `block in start'

@MehdiSv
Copy link

MehdiSv commented Mar 11, 2016

Same issue here.

[2016-03-11 00:52:19] [rpush] Shutting down... [2016-03-11 00:52:19] [rpush] Shutting down...
[rpush] Shutting down... [2016-03-11 00:52:19] [rpush] [ERROR] Errno::ENOENT, No such file or directory - connect(2) for /tmp/rpush.9547.sock
[2016-03-11 00:52:19] [rpush] [ERROR] Errno::ENOENT, No such file or directory - connect(2) for /tmp/rpush.8567.sock

Then it launches again and everything works.
But once in a while, rpush shuts down.

@neerajgupta2407
Copy link

Facing the same issue:
This is what i am getting in DB:
Unable to deliver notification 2011, received error (Failed to deliver to all recipients. Errors: MismatchSenderId.
Logs:
[2017-06-14 14:17:22] [ERROR] Rpush::DeliveryError, Unable to deliver notification 2011, received error (Failed to deliver to all recipients. Errors: MismatchSenderId.) /home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rpush-2.7.0/lib/rpush/daemon/gcm/delivery.rb:89:inhandle_failures'
/home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rpush-2.7.0/lib/rpush/daemon/gcm/delivery.rb:56:in ok' /home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rpush-2.7.0/lib/rpush/daemon/gcm/delivery.rb:37:in handle_response'
/home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rpush-2.7.0/lib/rpush/daemon/gcm/delivery.rb:21:in perform' /home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rpush-2.7.0/lib/rpush/daemon/dispatcher/http.rb:12:in dispatch'
/home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rpush-2.7.0/lib/rpush/daemon/dispatcher_loop.rb:66:in dispatch' /home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rpush-2.7.0/lib/rpush/daemon/dispatcher_loop.rb:35:in block (2 levels) in start'
/home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rpush-2.7.0/lib/rpush/daemon/dispatcher_loop.rb:25:in loop' /home/ubuntu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rpush-2.7.0/lib/rpush/daemon/dispatcher_loop.rb:25:in block in start'
[2017-06-14 14:17:41] [ERROR] [ios_app] Certificate expired at 2017-01-21 05:59:28 UTC.
`

@SofiaSousa
Copy link

Same issue here. Any any thoughts?

@neerajgupta2407
Copy link

@SofiaSousa Try updating the GCM account keys. It worked for me.
There might be mismatch in account keys you are using vs the decive_id with which its subscribed on.

@SofiaSousa
Copy link

@neerajgupta2407 thank you for your reply.

I read that is recommended to upgrade to FCM. So i did it and got a different key from Firebase that works if I try it with a curl request.

But when I try with Rpush, I get a different error:

Rpush::DeliveryError, Unable to deliver notification ID, received error 401 (Unauthorized, check your App auth_key.)

@aried3r
Copy link
Member

aried3r commented Feb 22, 2018

@SofiaSousa, I described how to help us debug this issue here. It shouldn't be an issue with rpush itself I think, since the request goes through, but the client (rpush) sent the wrong payload. In this case, the wrong auth_key.
Can you verify everything is correct?

I'm closing this issue since from the stacktraces and errors it looks like all of these are different errors. To everyone who still faces issues with this, please open a new issue after using the latest version of rpush.

@aried3r aried3r closed this as completed Feb 22, 2018
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

8 participants