Using Chrome we get a "The site has been updated in the background" when push notifications are send.
As per https://developers.google.com/web/fundamentals/push-notifications/handli...
Chrome will only show the "This site has been updated in the background." notification when a push message is received and the push event in the service worker does not show a notification after the promise passed to event.waitUntil() has finished.
The main reason developers get caught by this is that their code will often call self.registration.showNotification() but they aren't doing anything with the promise it returns. This intermittently results in the default notification being displayed. For example, we could remove the return for self.registration.showNotification() in the example above and we run the risk of seeing this notification.
You can see how it's an easy thing to miss.
Just remember - if you see that notification, check your promise chains and event.waitUntil().
We will have to find something in our promise chains.
Comments
Comment #2
ronaldtebrake commentedhttps://github.com/goalgorilla/social_pwa/pull/3
Comment #4
ronaldtebrake commented