Open Myeongjoon opened 7 years ago
Have you edited app/scripts/main.js's applicationServerPublicKey
? (Related tutorial: https://codelabs.developers.google.com/codelabs/push-notifications/#2 at section "Get Application Server Keys") Thanks
This is most likely the cause of the problem.
If anyone has any bright ideas for ways to check and highlight this issue - I'm all ears. The glitch.me page has been crazy helpful for making this codelab a little easier to work with, but this is probably the one place a lot of people still get tripped up on.
link : https://developers.google.com/web/fundamentals/codelabs/push-notifications/?hl=ko I followed uppper link.
Downloaded code https://github.com/GoogleChrome/push-notifications.git.
using
web server for chrome
, startedcompleted/8-push-subscription-change
In
http://127.0.0.1:8887/
view, clickedenable push messaging
button and copy entire json message(endpoint,p256h,auth) like docs.In https://web-push-codelab.glitch.me/ pasted copied json message to
Subscription to Send To
type
Text to Send
and clicksend push message
buttonresult alert :
<HTML>
<HEAD>
<TITLE>UnauthorizedRegistration</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>UnauthorizedRegistration</H1>
<H2>Error 400</H2>
</BODY>
</HTML>
Is there any solution?