0

I have recently been facing a problem regarding a web-push notification system via service worker. After upgrading our service worker's javascript to use the payload sent along with the push data in the event, all the users that registered to our push notification service prior to the service worker modification do not receive the notifications anymore.

I was able to observe that there seems to be an encryption problem at sending the push notification to the google API to then be forwarded to the user's chrome device.

What confuses me is that, while updating a service worker (i.e. in the install event) the subscription (returned by self.registration.pushManager.getSubscription()) object doesn't change, so I don't really undersand why would there be a problem to send the notification if the user information provided by the chrome api remains the same.

Could it also be because of a chrome upgrade that somehow changed the way to encrypt push data?

Have you guys faced the same problem ? Do you have any leads on where could the problem come from ?

Thanks in advance :)

robav2309
  • 55
  • 1
  • 5

1 Answers1

0

I will be under the assumption here that

upgrading our service worker's javascript

means that there is a substantial change in your SW code and how it handles caching and stuff. My guess there is how you wrote the SW code and Check out this answer. I haven't tried it our yet. But it sounds like a viable solution.

oninross
  • 989
  • 6
  • 23
  • Ok maybe I explained myself wrong. My main issue is not the service worker update, but the fact that users that registered prior to the substantial change I brought to my service worker do not receive the push notifications anymore. I was able to see that the p256dh and auth keys bound to a certain user have changed between the time he registered and today. Would there be a way to work around this? – robav2309 Jun 23 '17 at 08:16