首页 > 解决方案 > Failed to parse access token response: Error: Error while making request: getaddrinfo EAI_AGAIN accounts.google.com:443. Error code: EAI_AGAIN\

问题描述

I already used

"firebase-admin": "^6.3.0",

I did on NodeJS

var admin = require("firebase-admin");

var serviceAccount = require("path/to/serviceAccountKey.json");

admin.initializeApp({
  credential: admin.credential.cert(serviceAccount),
  databaseURL: "https://myapp.firebaseio.com"
});

I kept getting this in the logs

@firebase/database: FIREBASE WARNING: {"code":"app/invalid-credential","message":"Credential implementation provided to initializeApp() via the \"credential\" property failed to fetch a valid Google OAuth2 access token with the following error: \"Failed to parse access token response: Error: Error while making request: getaddrinfo EAI_AGAIN accounts.google.com:443. Error code: EAI_AGAIN\"."}

This used to work like 2 weeks ago. I don't know what changed.

How would one go about and debug this further?

标签: iosnode.jsfirebasefirebase-realtime-databasefirebase-cloud-messaging

解决方案


推荐阅读