Firebase函数错误:无法加载默认凭据
我从标题中得到一个问题,这里有完整的错误日志:Firebase函数错误:无法加载默认凭据,firebase,google-cloud-firestore,google-cloud-functions,Firebase,Google Cloud Firestore,Google Cloud Functions,我从标题中得到一个问题,这里有完整的错误日志: Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information. at GoogleAuth.getApplicationDefaultAsync (/workspace/node_modules/google-auth-library/
Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.
at GoogleAuth.getApplicationDefaultAsync (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:159:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
我知道,关于这一点已经有很多问题了:
- 部署为节点8或节点10,建议在几天前部署
- 职能的重新部署
- 使用或不使用配置对象初始化应用程序(
)admin.initializeApp();
- 函数必须返回值或承诺
- 将
作为服务帐户分配给GCP中的功能firebase adminsdk
- 将firebase工具和firebase adminsdk更新至最新版本
firebase adminsdk
,这有时会有所帮助,但这次没有我错过了什么?Firebase的其余部分是完美的,并且始终保持一致,但这越来越荒谬。谢谢大家的帮助。你解决了这个问题吗?我想这是由于循环中的异步函数造成的。我已经有一段时间没有遇到问题了,但在函数中没有做太多更改,所以没有,我没有一个最终的解决方案@MagicFlow