1

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?

CaitlynCodr
  • 238
  • 1
  • 15

2 Answers2

2

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

CaitlynCodr
  • 238
  • 1
  • 15
0

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

Cience
  • 41
  • 1
  • 1
  • 8