webpush: Webpush::InvalidSubscription: # Hi there. I’m trying to implement VAPID, but it works very strange: some pushes has been received, and some pushed raising an error (Webpush::InvalidSubscription: #<Net::HTTPBadRequest 400 UnauthorizedRegistration readbody=true>
or Webpush::InvalidSubscription: #<Net::HTTPGone 410 NotRegistered readbody=true>
). Why does FCM rejecting 50% of pushes? Thanks in advance
Hi there. I’m trying to implement VAPID, but it works very strange: some pushes has been received, and some pushed raising an error (Webpush::InvalidSubscription: #<Net::HTTPBadRequest 400 UnauthorizedRegistration readbody=true>
or Webpush::InvalidSubscription: #<Net::HTTPGone 410 NotRegistered readbody=true>
). Why does FCM rejecting 50% of pushes? Thanks in advance
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (1 by maintainers)
It’s difficult to tell without more information. Since it looks like you’re trying to use VAPID, I suggest going through the steps in the README and triple-check the relevant client- and server-side code.
One workaround I use is to refresh the subscriptions regularly. In the serviceworker-rails-sandbox, I call unsubscribe and resubscribe the push manager on each visit the page. I’d be interested to see if that works for you.