CircleCI 工作流程找不到 Firebase 项目:项目选择无效,请验证项目“项目”;存在并且您有权访问

发布于 2025-01-11 01:23:26 字数 1053 浏览 0 评论 0 原文

我们有一个循环工作流程,每当我们合并到 main 时,它都会自动将我们的 web 应用程序部署到生产环境中。但是,自从将 firebase-tools 更新到 V10.2.1 以来,每当我们尝试将 env-config 设置为“生产”时,我们都会收到以下消息。

> node env-config/env-config "production"

它在底层运行 firebase use production 命令。返回以下错误时,

Error: Command failed: firebase use production
    at ChildProcess.exithandler (child_process.js:383:12)
    at ChildProcess.emit (events.js:400:28)
    at maybeClose (internal/child_process.js:1058:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'firebase use production',
  stdout: '\n' +
    '\x1B[1m\x1B[31mError:\x1B[39m\x1B[22m Invalid project selection, please verify project \x1B[1mproduction\x1B[22m exists and you have access.\n',
  stderr: ''
}

现在出现了奇怪的部分:在同一工作流程中,它还运行 firebase use testfirebase use staging ,两者都按预期工作。在工作流程之外,只需手动运行 firebase use production 也可以按预期工作。有人有建议吗?

We have a circle workflow that automatically deploys our webapp to production for us whenever we merge to main. However, since updating our firebase-tools to V10.2.1 we get the following message whenever we try to set our env-config to "production".

> node env-config/env-config "production"

Under the hood it runs the firebase use production command. Which is when the following error is returned

Error: Command failed: firebase use production
    at ChildProcess.exithandler (child_process.js:383:12)
    at ChildProcess.emit (events.js:400:28)
    at maybeClose (internal/child_process.js:1058:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'firebase use production',
  stdout: '\n' +
    '\x1B[1m\x1B[31mError:\x1B[39m\x1B[22m Invalid project selection, please verify project \x1B[1mproduction\x1B[22m exists and you have access.\n',
  stderr: ''
}

Now here comes the weird part: in the same workflow it also runs firebase use test and firebase use staging with both work as expected. Outside of the workflow, just manually running firebase use production works as expected as well. Anyone have a suggestion?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

╰沐子 2025-01-18 01:23:26

我通过刷新工作流程使用的 firebase 令牌来修复它。

I fixed it by refreshing the firebase token used by the workflow.

你怎么这么可爱啊 2025-01-18 01:23:26

我也遇到了同样的问题,并且接受的答案对我来说并不清楚。

要创建新的 Firebase 令牌,请在 Firebase CLI 中使用以下命令

firebase login:ci

我从这个此 stackoverflow线程

I just faced the same issue as well and the accepted answer was not clear to me.

To create a new firebase token please use the following command in the firebase CLI

firebase login:ci

I got this answer from this and this stackoverflow thread

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文