【问题标题】:Firebase Cloud Function Showing As OfflineFirebase 云功能显示为离线
【发布时间】:2018-08-17 19:58:49
【问题描述】:

我刚刚发生了一些奇怪的事情,我想看看是否有人知道解决它的方法。我已经在 App Engine、3 Cloud Functions 和 Firestore 存储库中部署了一个应用程序一段时间。长话短说,我将我的应用程序从 App Engine 中移出,因此禁用了它。但是,我仍然希望我的功能能够正常工作以及保留我的 Firestore。但是,一旦我禁用 App Engine,我的功能就会显示为离线,并且我的 Firestore 被禁用,直到我重新启用 App Engine。我对此感到有些困惑。我不再想要我的 App Engine 实例了。有什么想法可以禁用 App Engine 并仍然让我的 Cloud Functions 工作和 Firestore 可用?

【问题讨论】:

  • 请详细说明问题。您使用的是 Firebase Functions 和 Firestore 还是 Cloud Functions 和 Firestore?
  • 可能相关;我有一些云功能(没有 Firebase)只是在gcloud 输出上显示为OFFLINE,没有任何解释;但是the web dashboard 显示了有关函数离线原因的更多详细信息(准确地说是错误消息)。但我猜你已经通过 Firebase 控制台尝试过了 :)
  • 我正在使用 firebase 功能(实际上是 Google 云功能)和 Firestore。奇怪的是,如果不再次启用我的应用引擎应用程序,我就无法运行我的函数或访问我的 Firestore

标签: firebase google-cloud-firestore google-cloud-functions


【解决方案1】:

Cloud Firestore 依赖于 Cloud Datastore,而后者又依赖于 Google App Engine。这是Medium blogpost about the issue

Cloud Datastore documentation 中有一条注释提到了三个组件之间的密切关系:

Cloud Firestore 和 App Engine:您不能在同一个项目中同时使用 Cloud Firestore 和 Cloud Datastore,这可能会影响使用 App Engine 的应用。如果您需要使用 Cloud Datastore,请尝试将 Cloud Firestore 与其他项目一起使用。

此外,StackOverflow answer by a Googler 声明需要启用 GAE 才能使 Cloud Datastore 正常工作。


总而言之,必须启用 GAE 才能使用 Cloud Datastore,并且项目必须能够使用 Cloud Datastore 才能使 Cloud Firestore 工作。

【讨论】:

  • 完美!谢谢!
猜你喜欢
  • 2020-05-01
  • 1970-01-01
  • 2021-11-25
  • 2016-04-01
  • 1970-01-01
相关资源
最近更新 更多