Chrome Web Notification Push Unauthorized Registration exception

随声附和 提交于 2019-12-12 04:17:48

问题


I am implementing push notifications from my server to the users who are subscribed to my server.

Right now sending the push notifications to Firefox users works like a charm. However, on Chrome I get an Unauthorized Registration error. I am using Django as a backend.

In this image are the relevant parts of the error and my code (email edited), aswell as the subscription. If any more information is needed please let me know.

Does anyone know why I can't send push notifications on Chrome?

And I am using this library.


回答1:


In the murky depths of Google and Github I have found the answer. If you install pywebpush it installs v1.2.2 of py-vapid, which had a bug in it. Overwriting this package with

pip install py-vapid --upgrade

installs the patched version 1.2.3 (released only 5 days ago as of this post), fixes the Unauthorized bug I was having.




回答2:


I've just pushed pywebpush 1.0.2 which includes py-vapid 1.2.3. Sorry for the delay, but it was unavoidable.

Please don't be afraid to file issues against the package. I do try to respond fairly quickly and it helps out everyone.



来源:https://stackoverflow.com/questions/44121081/chrome-web-notification-push-unauthorized-registration-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!