pusher / push-notifications-web

Beams Browser notifications
MIT License
39 stars 19 forks source link

Notification isn't getting received. #96

Closed abhagsain closed 2 years ago

abhagsain commented 3 years ago

My server is sending notification to the client and I even tried to send a custom notification from the Debug Console but I'm not getting any notification on any of the devices. And please also clarify what's this Device de-registered event?

Thank you

image

web-dev-ua commented 3 years ago

I had the same problem. It turned out that I had 2 service workers connected. When I left only one, the problem disappeared.

abhagsain commented 3 years ago

I had the same problem. It turned out that I had 2 service workers connected. When I left only one, the problem disappeared.

Yes, having multiple service-worker is the problem. I was using next-pwa but it doesn't work well. Do you any references to make it work with an existing service-worker? How to pass push-notification control over to Pusher Beams and other stuff to next-pwa

The Pusher setup docs shows that we just need to pass the initialized service-worker and Pusher will handle from thereon but no luck :(

benw-pusher commented 3 years ago

Were you sure to add the import line to the top of the existing service worker? importScripts("https://js.pusher.com/beams/service-worker.js");

If you need further support it may be best to reach out to our support team at https://support.pusher.com/hc/en-us/requests/new

abunour22 commented 2 years ago

same issue !

benw-pusher commented 2 years ago

Closing this as the original reporter has resolved the issue. @abunour22 and anyone who finds this in the future - please get in touch with us at https://support.pusher.com/hc/en-us/requests/new so we can assist you.