推送通知未显示在歌剧中

时间:2019-11-08 08:43:59

标签: node.js push-notification opera web-push

我已经成功注册了服务人员。当我尝试发送推送通知时,从后端说:push subscription has unsubscribed or expired.。这是我仅有的订阅者。端点如何在一分钟内过期?奇怪。 我在下面给你示例错误。我正在使用nodejsweb-push模块发送推送通知。有人面临同样的问题吗?

错误日志:

{ WebPushError: Received unexpected response code
    at IncomingMessage.<anonymous> (/Users/lalit/studio/pnp/new-instantpush/node_modules/web-push/src/web-push-lib.js:316:20)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1081:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  name: 'WebPushError',
  message: 'Received unexpected response code',
  statusCode: 410,
  headers:
   { 'content-type': 'text/plain; charset=utf-8',
     'x-content-type-options': 'nosniff',
     'x-frame-options': 'SAMEORIGIN',
     'x-xss-protection': '0',
     date: 'Fri, 08 Nov 2019 08:21:45 GMT',
     'content-length': '47',
     'alt-svc':
      'quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000',
     connection: 'close' },
  body: 'push subscription has unsubscribed or expired.\n'
}

0 个答案:

没有答案