46
Views
9
Comments
[PWA PushWoosh Sample] Unable to receive notifications on PWA App.
Question
Forge component by Ricardo Costa
0
Published on 23 Apr 2020

Hello Recardo ,


Thanks for this component and i tried this with my own PW credentials(App code and Sender ID) and alterations but Unable to receive notifications on my PWA App running on chrome browser.


Strange issue is that its able to subscribe user and i can see count increasing in chrome subscriber in PW console but the notification is not delivered/flashed/received on chrome browser .


Could you please let me know possible issues in my code.


Regards ,

Nitesh

Staff
Rank: #151

Hello Nitesh.

Can you share with me what you are getting in the Console?


Ricardo

Staff
Rank: #151

Hello.

That t object is the notification object. So, you are receiving the push notifications.

The Chrome browser however is not popping it up.

Can you try Firefox to see if the notification is popped up?

If so, you must search for settings on your chrome browser that may be blocking the notification pop up.


Thank you,

Ricardo

Staff
Rank: #151

Hello Nitesh.

You are right about the t object. I thought it was the notification one but it's not.

And you are also right about the Chrome issue.

Although on my phone Chrome it's working:

And even though it's a PWA you can run it as a normal web app in firefox and it's also working.


So, I'm out of ideas for the Chrome issue and also out of time, since I'm allocated to something else.

Try to see in the push woosh community if someone is having the same issue.

Meanwhile I will try to contact the PushWoosh support.


Thank you,

Ricardo

Staff
Rank: #151

Hello Nitesh.

I've uploaded a new version that fixes the problem you reported.

It's not the most desirable solution and I will try to find a better one, but it's the possible solution at the moment.

You will have to copy the content it's being generated by the platform to the pwaServiceWorker.js file and append in the beginning the "importScripts('https://cdn.pushwoosh.com/webpush/v3/pushwoosh-service-worker.js' + self.location.search)". Include the resulting file as a resource (pwaServiceWorkerNew.js) and update the InitPushWoosh script with the new logic of the sample.

Thank you,

Ricardo Costa