ruby-on-rails - 使用 Ruby 的 Firebase 云消息传递显示无效令牌
问题描述
让服务器运行几个小时后,云消息传递开始返回以下内容(下面的截断响应)。
{:body=>"{\"error\":\"InvalidToken\"}", :response=>"Only applies for JSON requests. Indicates that the request could not be parsed as JSON, or it contained invalid fields."}
一旦我重新启动 Apache 并尝试重新发送 Firebase Cloud 消息,它将成功发送。
{:body=>"{\"message_id\":4439418067666362930}", :status_code=>200, :response=>"success"}
我知道令牌是有效的,因为它会在 apache 重新启动后正确发送。我正在使用带有 FCM gem 0.0.6 的 Ruby Rails
fcm (0.0.6)
解决方案
推荐阅读
- uwp - UWP 性能:Task.Run() 与后台服务
- javascript - Javascript:是否只有一页的 sessionStorage 或 localStorage 之类的东西?
- c# - 如何使用 foreach 终止和重新启动
- node.js - 为什么微软用 NodeJS 而不是 .NET 制作 Visual Studio Code?
- javascript - IE 11 不加载 JS 脚本(将其从开发者工具的脚本列表中删除)
- php - 子 pid XXXX 退出信号分段错误 (11),HTTPD_PATH 中可能的核心转储
- c# - 如何在 C# 中显示一个国家/地区的正确时区名称?
- python - 由于有效负载无效,向 Typeform 发布请求失败
- ios - NativeScript - 使用 iBeacon 重新启动应用程序,AppDelegate 必须实现窗口属性
- javascript - 使用 lodash 过滤数组 WithIn Array