【问题标题】:400 Bad Request on Push Notification Symfony / Sly Notification Pusher推送通知 Symfony / Sly 通知推送器的 400 错误请求
【发布时间】:2019-09-05 19:16:01
【问题描述】:

在我的 symfony 项目中,我使用捆绑 Sly 通知推送器在 ios 和 android 设备上发送推送通知,直到今天一切正常! 但是现在我有一个大问题,当我发送推送通知时出现此错误: "400 bad request : invalid message "

当我尝试调试时,我看到推送函数返回此错误。 "3" not display in debug mode

我已经阅读了文档并遵循了语法,但问题是一样的,我们的应用程序从 1 年开始就使用了这个代码,而今天由于这个问题我们不能使用推送通知。

请帮助我们!

提前谢谢你!

【问题讨论】:

    标签: android ios symfony push-notification


    【解决方案1】:

    您能否转储您尝试发送的消息,它可能包含无效字符或超出通知允许的最大大小(有效负载为 256 字节)。

    【讨论】:

    • 感谢您的回答,但我认为这不是问题,因为即使我创建了一个包含 1 个字符的消息,也会返回错误。这是返回的内容: object(Sly\NotificationPusher\Model\Message)#948 (2) { ["text":"Sly\NotificationPusher\Model\Message":private]=> string(27) "CentoLive : 我的通知" ["options":protected]=> array(2) { ["body"]=> string(8) "你好..." ["title"]=> string(27) "CentoLive : 我的通知" } }
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-11
    相关资源
    最近更新 更多