【问题标题】:Push not working on Parse Server after Apple push certificate renewalApple 推送证书续订后,推送在 Parse Server 上不起作用
【发布时间】:2021-11-23 19:04:55
【问题描述】:

在解析器服务器上发送推送后,我在服务器日志中低于。服务器崩溃并在此之后重新启动。

节点版本 17.1.0

解析服务器 - 4.2.0

这在我将 APN 证书更新到服务器后开始发生。我从解析仪表板尝试过,它显示推送已发送。

{
  "result": {
    "headers": {
      "X-Parse-Push-Status-Id": "3euayowDhH"
    },
    "response": {
      "result": true
    }
  }
}
 verbose: _PushStatus 3euayowDhH: sending push to installations with %d batches
 verbose: Sending push to 25
 /app/node_modules/parse-server/lib/ParseServer.js:229
           throw err;
           ^
 Error: unsupported
     at configSecureContext (node:internal/tls/secure-context:276:15)
     at Object.createSecureContext (node:_tls_common:116:3)
     at Object.connect (node:_tls_wrap:1621:48)
     at Object.connect (node:internal/http2/core:3262:22)
     at Client.write (/app/node_modules/@parse/node-apn/lib/client.js:37:28)
     at /app/node_modules/@parse/node-apn/lib/provider.js:29:62
     at Array.map (<anonymous>)
     at Provider.send (/app/node_modules/@parse/node-apn/lib/provider.js:29:36)
     at APNS.sendThroughProvider (/app/node_modules/@parse/push-adapter/lib/APNS.js:172:27)
     at APNS.send (/app/node_modules/@parse/push-adapter/lib/APNS.js:158:28)

在 index.js 中推送配置

push: {
        ios: {
            pfx: 'certs/ApplePush.p12',  
            passphrase: process.env.APPLE_PUSH_PASSPHRASE,
            topic: process.env.APPLE_PUSH_TOPIC, 
            production: false 
        }
    }

我已搬到 M1 Macbook Pro Monterey。会不会有影响?

发现this 问题但不确定是否相关。没有尝试其中提到的命令,因为我不熟悉它。

【问题讨论】:

  • 您介意分享一下您的解析服务器配置如何设置证书吗?
  • @DaviMacêdo 你有什么建议吗?我创建了新证书,将生产设置为 true 但没有成功。

标签: node.js parse-platform apple-push-notifications


【解决方案1】:

发现问题。我忽略了 Parse Server 支持 Node.js 直到 v16,我已将我的依赖项设置为 >9.0.0,因此 heroku 正在安装 v17。

我在https://github.com/nodejs/node/issues/40672 上面发布的 URL 应该让我进行更多探索。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-08-20
    • 1970-01-01
    • 2015-02-28
    • 2023-03-14
    • 1970-01-01
    • 2021-09-17
    • 2011-05-03
    相关资源
    最近更新 更多