Google Firebase Functions 部署失败 - 我该怎么办?

Google Firebase Functions deployment fails - what can I do?

错误信息:

Error: There was an error deploying functions

firebease-debug.log 持有这个:

 [debug] [2021-11-16T12:12:16.165Z] Error: Failed to upsert schedule function lab2 in region europe-west3

功能代码:

exports.lab2 =
    functions
        .region('europe-west3')
        .pubsub.schedule('*/10 * * * *')
        .onRun(lab);

我能做什么? Google 支持导致Whosebug,所以我post 在这里。有没有更好的方法来处理 Google 云问题?

当您在 Firebase Functions 中使用计划函数时,会创建 Cloud Scheduler 工作所需的 App Engine 实例。你可以阅读它 here。在其设置过程中,系统会提示您 select 项目的默认 Google 云平台 (GCP) 资源位置(如果在设置其他服务时尚未 selected)。

您收到该错误是因为您指定的默认 GCP 资源位置与计划的 Cloud Functions 区域不同。如果您在 Firebase 中单击项目概览旁边的齿轮,您可以看到您的资源所在的位置。将默认 GCP 资源位置设置为与调度程序功能区域相同,解决了问题。

我们的计划功能部署失败的原因是因为 cron 作业公式。由于某种原因,firebase 无法理解 0 0 3 1/1 * ? *,但可以理解 every 5 minutes

很遗憾 firebase 没有提供更好的错误消息。 Error: Failed to upsert schedule function xxx in region xxx 太笼统了。