webpush: WebPush, 0.2.5, Webpush::InvalidSubscription (#):
Hi
I’m making a first venture in push notifications using gcm and your timely gem.
I’m suffering from the error above, even when I send without payload.
Double and triple checked, 1) the id in manifest.json 2) the endpoint, the keys 3) the apikey.
I’m getting everything back from the service worker as I expect but I’m failing on this bit:
Webpush.payload_send( message: JSON.generate(message), endpoint: endpoint, p256dh: p256dh, auth: auth, api_key: api_key)
Any ideas of further things I could try? I’m kind of stuck.
Thanks!
Tom
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 30
@rossta I’ve been having this exact InvalidSubscription problem with your
serviceworker-rails-sandbox
in a weird way, everything works on my laptop through localhost but when I upload the web app to a server I get this error for every single push request on Chrome. On Firefox however everything works fine. Any ideas on how to solve this?What helped me solve 400 UnauthorizedRegistration error was migrating from GCM to FCM and updating the API key as explained here: http://stackoverflow.com/questions/37789264/api-key-for-gcm-is-suddenly-invalid-unauthorized-401-error