【发布时间】:2016-09-27 13:33:39
【问题描述】:
我正在尝试使用 web-push node.js 库向 chrome 浏览器发送推送通知。
发射后
webpush.sendNotification(pushSubscription,payload)
我得到这个响应的方法 -
{ Error: unable to verify the first certificate
at Error (native)
at TLSSocket.<anonymous> (_tls_wrap.js:1060:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:584:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38) code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' }
我猜这是 SSL 问题?我如何通过 localhost 测试这个库?
谢谢
【问题讨论】:
-
你还能重现这个吗?
-
是的。当您使用 http 创建节点服务器时会发生这种情况。
标签: node.js push-notification google-cloud-messaging web-push