获取“EndpointDisabled"来自亚马逊 SNS [英] Getting "EndpointDisabled" from Amazon SNS

查看:35
本文介绍了获取“EndpointDisabled"来自亚马逊 SNS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用亚马逊 SNS.通知运行良好,但有时我会收到此错误:

I'm using Amazon SNS. Notifications work well, but sometimes I get this error:

{
    "message": "Endpoint is disabled",
    "code": "EndpointDisabled",
    "name": "EndpointDisabled",
    "statusCode": 400,
    "retryable": false
}

也许你知道为什么.

推荐答案

您可以创建一个新的 SNS 主题,例如 push-notification-failures,然后关联您的 APNS/APNS_SANDBOX 应用程序的交付失败""事件.通过电子邮件订阅事件(并确认),您将获得有关故障的有用调试信息.这一切都可以通过 SNS 控制台完成,不需要 API 调用来执行.

You can create a new SNS topic such as push-notification-failures and then associate your APNS/APNS_SANDBOX applications' "Delivery Failures" event to it. Subscribe to the event via email (and confirm) and you'll get useful debugging information about failures. This can all be accomplished through the SNS console and doesn't require API calls to perform.

订阅此 SNS 主题的 HTTP 端点并记录所有交付失败可能是值得的,这样您就可以获得历史数据并调试生产问题.

It is probably worth it to subscribe an HTTP endpoint to this SNS topic and record all delivery failures so you have historical data to work from and debug production issues.

例如,与端点关联的平台令牌无效"的传送 FailureMessage 表示您正在从 APNS_SANDBOX 向 APNS 注册设备发送消息,反之亦然.这可能意味着您的构建系统有错误的 APNS 设置.(我们有一个令人沮丧的问题,即开发人员使用 APNS_SANDBOX 构建二进制文件,而 TestFlight 使用 APNS 构建二进制文件进行本地测试和 QA,这也是导致我走上这条道路的原因.)

For example a delivery FailureMessage of "Platform token associated with the endpoint is not valid" means that you're sending a message from APNS_SANDBOX to an APNS registered device or vice versa. This can mean that you have the wrong APNS settings for your build system. (We have a frustrating problem of developer built binaries using APNS_SANDBOX vs. TestFlight built binaries using APNS for local testing and QA which is what led me down this path.)

这篇关于获取“EndpointDisabled"来自亚马逊 SNS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆