【问题标题】:Not able to send device push notification due to app/invalid-credential error由于应用程序/无效凭据错误,无法发送设备推送通知
【发布时间】:2017-08-29 03:23:28
【问题描述】:

我正在尝试使用 cordova 中的 firebase 发送设备推送通知(fcm-node 节点插件)使用此link,我已经获得了设备注册令牌,但是当我尝试将通知发送到注册设备时,出现以下错误:

{ 错误:通过“凭据”属性提供给 initializeApp() 的凭据实现未能获取有效的 Google OAuth2 访问令牌,并出现以下错误:“getaddrinfo ENOTFOUND accounts.google.com accounts.google.com:443”。 在 FirebaseAppError.Error (本机) 在 FirebaseAppError.FirebaseError [作为构造函数] (C:\Users\212606402\Learning\Alert server\pushalert-server\alert-push-notification-server\node_modules\firebase-admin\lib\utils\error.js:25:28 ) 在新的 FirebaseAppError (C:\Users\212606402\Learning\Alert server\pushalert-server\alert-push-notification-server\node_modules\firebase-admin\lib\utils\error.js:70:23) 在 C:\Users\212606402\Learning\Alert server\pushalert-server\alert-push-notification-server\node_modules\firebase-admin\lib\firebase-app.js:78:23 在 process._tickCallback (internal/process/next_tick.js:103:7) 错误信息: { 代码:'app/invalid-credential', 消息:“通过“凭据”属性提供给 initializeApp() 的凭据实现未能获取有效的 Google OAuth2 访问令牌,并出现以下错误:“getaddrinfo ENOTFOUND accounts.google.com accounts.google.com:443”。 } }

谁能帮我看看这里出了什么问题。

我也看到了这个thread,但这是一个不同的错误。

【问题讨论】:

    标签: android cordova firebase push-notification


    【解决方案1】:

    解决方案是更新您的系统日期/时间。

    windows系统最好是与互联网时间服务器同步时间。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-26
      • 1970-01-01
      • 2019-08-30
      • 1970-01-01
      相关资源
      最近更新 更多