New issue
Advanced search Search tips

Issue 680945 link

Starred by 3 users

Issue metadata

Status: Archived
Owner: ----
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

service worker for Desktop Notifications disappears after 2-3 days

Reported by ryan.she...@intercom.io, Jan 13 2017

Issue description

Chrome Version       : 55.0.2883.95 (Official Build) (64-bit)
URLs (if applicable) :
Other browsers tested: OK Firefox 50.1, OK Canary 57.0.2
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: N/A
    Firefox: OK
         IE: N/A

What steps will reproduce the problem?
(1) Following Chrome/Mozilla WebPush documentation we added push notifications to our application (see attached SW).  
(2)
(3)

What is the expected result?


What happens instead?


Please provide any additional information below. Attach a screenshot if
possible.

 
More details to come ^ (10 min)
What steps will reproduce the problem?
(1) Following Chrome/Mozilla WebPush documentation we added push notifications to our application (see attached SW).  
(2) When the service worker is installed, push notifications occur as expected. 
(3) After 2-3 days (of no activity) push notifications stop being shown - on further investigation the service worker in question is not in the list under chrome://serviceworker-internals/ (show all clicked etc.)

If we run the following code we can see a service worker is registered from weeks earlier correctly.

navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) {
   serviceWorkerRegistration.pushManager.getSubscription()
     .then(function(subscription) {
       navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) {
   serviceWorkerRegistration.pushManager.getSubscription()
     .then(function(subscription) {
         console.log(subscription);
         console.log(serviceWorkerRegistration.scope);
     });
   })
 });
});
Promise {[[PromiseStatus]]: "resolved", [[PromiseValue]]: undefined}
raven.js:80 PushSubscription {endpoint: "https://android.googleapis.com/gcm/send/fnEwMVoyoeXXX", options: PushSubscriptionOptions}
raven.js:80 https://<correctDomain>/


What is the expected result?

Always receive push notifications (works in Firefox)

What happens instead?

We receive push notifications for several days, then it stops.

embercom_notification_service_worker.js
1.1 KB View Download
Components: Blink>ServiceWorker
I was verifying again with Canary 57.0.2 and it seems to have removed the service worker too. The Google service is sending the message to the browser as we are getting the default notification "The site has been updated in the background".

So it looks like Canary is not working correctly either. If there is any other information you need - please let me know and I'll provide.

Comment 5 by ajha@chromium.org, Jan 16 2017

Labels: TE-NeedsTriageHelp
Labels: Needs-Feedback
Thank you for reporting this. ServiceWorkerRegistration can be removed for a variety of reasons. To identify the cause, could you confirm following things?

1. Does your app call ServiceWorkerRegistration.unregister()? It removes ServiceWorkerRegistration and push subscription.
2. Did you use the same Chrome profile? Didn't you use the incognite mode? Each profile has its own registration sets.
3. Did you clear caches from chrome://settings/clearBrowserData? It also removes the registration.
4. Were registrations for other origins also removed from chrome://serviceworker-internals?
Project Member

Comment 7 by sheriffbot@chromium.org, Feb 17 2017

Status: Archived (was: Unconfirmed)
No feedback was received in the last 30 days from reporter "ryan.sherlock@intercom.io", so archiving this. Please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment