【问题标题】:Firebase deploy function Build failed: Build error details not availableFirebase 部署功能构建失败:构建错误详细信息不可用
【发布时间】:2021-02-06 05:07:57
【问题描述】:

我有几个项目有同样的问题。就在一天前,它的部署还不错。现在部署将退出并出现错误:

构建失败:构建错误详细信息不可用。

来自 GCP 的日志如下所示(替换为项目名称):

{
  "textPayload": "Step #5 - \"exporter\": \u001b[31;1mERROR: \u001b[0mfailed to export: failed to write image to the following tags: [us.gcr.io/project-name/gcf/us-central1/e2c2be8f-3c6d-4689-b474-21e8817b750e:ssr_version-162: GET https://storage.googleapis.com/us.artifacts.project-name.appspot.com/containers/images/sha256:b4c8acdb6f61130b2c632d1378bc84c602d6f4af2286fb9fb174e8f8376ec19f?access_token=REDACTED: unsupported status code 404; body: <?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: us.artifacts.project-name.appspot.com/containers/images/sha256:b4c8acdb6f61130b2c632d1378bc84c602d6f4af2286fb9fb174e8f8376ec19f</Details></Error>]",
  "insertId": "1263383d-eff6-4302-bb99-8a8a2ad01867-554",
  "resource": {
    "type": "build",
    "labels": {
      "build_trigger_id": "",
      "build_id": "1263383d-eff6-4302-bb99-8a8a2ad01867",
      "project_id": "project-name"
    }
  },
  "timestamp": "2020-10-23T06:11:27.265803715Z",
  "severity": "INFO",
  "labels": {
    "build_step": "Step #5 - \"exporter\""
  },
  "logName": "projects/project-name/logs/cloudbuild",
  "receiveTimestamp": "2020-10-23T06:11:27.777967721Z"
}

当他们在 us.artifacts 存储桶中找不到/访问图像的缓存副本时,似乎构建失败了。

一直在尝试与 Google 联系,但到目前为止没有任何回应。还有谁有相同的问题吗?目前还没有看到其他人的任何报道。

【问题讨论】:

  • 我也遇到了从 20 年 4 月 10 日开始的同样问题,到目前为止还没有运气
  • 我可以使用 firebase deploy --only functions:name 单独部署每个功能,但同时部署所有功能时失败:/
  • 看到同样的问题。您的工件云存储桶上是否有任何活动的删除生命周期规则?

标签: firebase google-cloud-build


【解决方案1】:

更新答案

从 Google 云存储 (us.artifacts.{{project}}.appspot.com) 中删除整个存储桶,不仅对我有用。

原答案(以上更好)

  1. 从谷歌云功能界面我删除了所有功能
  2. 单独重新部署每个功能firebase deploy --only functions:$name

然后我能够通过 cloud build + 通过 firebase 命令在本地重新部署所有功能

【讨论】:

  • 我遇到了同样的问题。但是,从 Google Cloud Functions 界面中删除功能不会破坏我的应用程序吗?
  • 这解决了我在 2021 年的问题。不知道为什么删除内容不起作用 - 我不得不删除整个存储桶
【解决方案2】:

我遇到了同样的问题。就我而言,我确保 GCP 上 Node 的运行时版本与我本地开发环境中的版本相匹配。所以我不得不将我的节点 v15 降级到节点 v12,这是我的项目在 GCP 上运行的。

【讨论】:

    猜你喜欢
    • 2021-05-03
    • 2020-07-11
    • 2013-09-21
    • 2018-10-13
    • 2022-09-12
    • 1970-01-01
    • 2021-12-15
    • 2018-04-24
    • 1970-01-01
    相关资源
    最近更新 更多