GoogleChromeLabs / web-push-codelab

Other
557 stars 293 forks source link

Failed to subscribe the user #31

Open iAyush opened 7 years ago

iAyush commented 7 years ago

i am getting the error, "Failed to subscribe the user: DOMException: Subscription failed - no active Service Worker" in my Https tomcat server when i press the enable button..PLS help

gauntface commented 7 years ago

Could you take a screenshot of Chrome DevTools > Application Tab > Service Worker. It might help diagnose the problem to see if the service worker is being registered at all.

iAyush commented 7 years ago

[image: pasted1]

On Wed, Feb 1, 2017 at 12:37 AM Matt Gaunt notifications@github.com wrote:

Could you take a screenshot of Chrome DevTools > Application Tab > Service Worker. It might help diagnose the problem to see if the service worker is being registered at all.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GoogleChrome/push-notifications/issues/31#issuecomment-276459629, or mute the thread https://github.com/notifications/unsubscribe-auth/AQun62moIdCOzpqbsJAcVEQ5JXPGOC6Qks5rX4ZdgaJpZM4LyRZ0 .

-- Thanks Ayush Agarwal CloudKaptan

--

===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.

iAyush commented 7 years ago

this is what it shows when i click on the enable button[image: Screenshot (102).png]

On Wed, Feb 1, 2017 at 2:42 AM Ayush Agarwal ayush@cloudkaptan.com wrote:

[image: pasted1]

On Wed, Feb 1, 2017 at 12:37 AM Matt Gaunt notifications@github.com wrote:

Could you take a screenshot of Chrome DevTools > Application Tab > Service Worker. It might help diagnose the problem to see if the service worker is being registered at all.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GoogleChrome/push-notifications/issues/31#issuecomment-276459629, or mute the thread https://github.com/notifications/unsubscribe-auth/AQun62moIdCOzpqbsJAcVEQ5JXPGOC6Qks5rX4ZdgaJpZM4LyRZ0 .

-- Thanks Ayush Agarwal CloudKaptan

-- Thanks Ayush Agarwal CloudKaptan

--

===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.

Gekctek commented 7 years ago

I had the same issue but unchecked the 'Bypass for network' checkbox in service workers and it worked. The image in the tutorial has it check but the text says nothing about it

mikegarlick83 commented 7 years ago

I am still getting this error even though I have unchecked the 'Bypass for network' checkbox in service workers. screen shot 2017-02-17 at 13 10 30

UPDATE...

Uncheck the 'Bypass for network' checkbox in service workers AND restart your Web Server for Chrome and it worked for me.

iAyush commented 7 years ago

Maybe your service worker is not registered or your connection is not secured. Try doing it in a secure network

On Fri, Feb 17, 2017 at 6:40 PM mikegarlick83 notifications@github.com wrote:

I am still getting this error even though I have unchecked the 'Bypass for network' checkbox in service workers. [image: screen shot 2017-02-17 at 13 10 30] https://cloud.githubusercontent.com/assets/23662761/23066439/7e561be8-f512-11e6-8694-2799597a3324.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GoogleChrome/push-notifications/issues/31#issuecomment-280645072, or mute the thread https://github.com/notifications/unsubscribe-auth/AQun6woIqYGGlvj52H3Uld6B2Wsy2rLZks5rdZxdgaJpZM4LyRZ0 .

-- Thanks Ayush Agarwal CloudKaptan

--

===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.

gauntface commented 7 years ago

This might be solved by waiting for the service worker to activate - I need to do some digging.

okoyejj commented 6 years ago

I believe you might be using a wrong public key, it is worth checking. Generate your public key from https://web-push-codelab.appspot.com as these are the keys handled by the push servers.

timotheecour commented 5 years ago

the problem for me was fixed as follows:

image

ie, notifications => Allow