PushManager subscription pledge never fulfills or rejects

I am currently facing a problem with some versions of Chrome (Chromium), where the promise of ServiceWorker’s PushManager.subscribe .

The code itself is pretty simple:

 return serviceWorkerRegistration.pushManager.subscribe({ userVisibleOnly: true }); 

I have a valid and accessible JSON manifest that provides the GCM sender id . I also tried various implementations as described in this post , but the result is still the same.

Part of the subscription works well with each version 47+ , a problem appears with older versions. (I use Chromium's continuous builds to test various major versions).

Also note that using Chromium 46 (and below) on Ubuntu, the promise is rejected after 15 minutes with Internal Server Error .

+8
javascript web-push push-api service-worker chrome-gcm
source share
6 answers

The problem is userVisibleOnly: true as a parameter.

This was introduced only in chrome 47. Before that, you need to pass it as a manifest parameter. https://johnme-gcm.appspot.com/manifest.json is a good example.

+1
source share

It seems that the Chromium Team was working on it . If I'm not mistaken, the fix will be released on Chrome 55

+1
source share

This issue is reproduced on chrome 55.0.2883.87 on Windows 7. Subscription promise is not resolved or rejected. But this happens only on one machine with the mentioned combination

0
source share

I had the same issue in Chrome 67, and restarting the browser fixed it.

0
source share

Updating and restarting Google Chrome was resolved for me

0
source share

I had the same problem when using corporate proxy. Since there is no Internet connection, a subscription cannot be established and Promise is never permitted.

0
source share

All Articles