1

While using the serviceWorkerRegistration.pushManager.subscribe method from a ServiceWorker, the created endpoint sometimes contains an "/undefined" at the end of the string.

For example, through a Chrome ServiceWorker : https://android.googleapis.com/gcm/send/xxx...xxx/undefined

I must say that I've got a valid Android Sender ID, and if remove this extra part, I'm able to send a push to the user.

Last but not least, this situation has happened with both Chrome and Firefox subscriptions.

Arturo
  • 213
  • 1
  • 3
  • 12
  • Can you show us your source code? It's difficult to find out what's the problem otherwise :) – Marco Castelluccio Mar 05 '16 at 19:38
  • As I thought the issue was induced by the Mozilla an GCM push services, I willingly didn't paste the ServiceWorker code I'm using. But in any case, it is pretty simple : a `serviceWorkerRegistration.pushManager.subscribe` promise, with the `userVisibleOnly: true` in param, and of course an accessible JSON manifest with the sender ID for Chrome. Also, this event is quite sporadic (but not isolated to one domain scope), **most of the time, the endpoint is "undefined"-free**. I'm really trying to understand what could be the cause, and why both on GCM and Mozilla. – Arturo Mar 05 '16 at 19:50
  • 1
    I've never experienced this issue, it would help if you could add a snippet of your code to your question, since I suspect there's something wrong with it. – Marco Castelluccio Mar 06 '16 at 01:33

0 Answers0