firebase-functions icon indicating copy to clipboard operation
firebase-functions copied to clipboard

Cannot deploy firebase functions

Open emmanuel-alanmeds opened this issue 3 months ago • 21 comments

Related issues

[REQUIRED] Version info

node: nodejs20 runtime in firebase.sjon

firebase-functions: 6.4.0

firebase-tools: 14.17.0

firebase-admin: 13.4.0

[REQUIRED] Test case

[REQUIRED] Steps to reproduce

I run this command locally

firebase --debug deploy --only functions:<NAME_OF_FUNCTION> --force

[REQUIRED] Expected behavior

That the functions deploys like is always has been up until about a week ago

[REQUIRED] Actual behavior

Were you able to successfully deploy your functions? No

"original": { "name": "FirebaseError", "children": [], "context": { "function": "projects//locations/us-central1/functions/" }, "exit": 1, "message": "Failed to create function projects//locations/us-central1/functions/", "original": { "name": "FirebaseError", "children": [], "context": { "body": { "error": { "code": 400, "message": "Could not create Cloud Run service***. spec.template.metadata.annotations[run.googleapis.com/minScale]: ", "status": "INVALID_ARGUMENT" } }, "response": { "statusCode": 400 } }, "exit": 1, "message": "Request to https://cloudfunctions.googleapis.com/v2/projects//locations/us-central1/functions?functionId= had HTTP Error: 400, Could not create Cloud Run service ***. spec.template.metadata.annotations[run.googleapis.com/minScale]: ", "status": 400 }, "status": 400, "code": 400 } }

emmanuel-alanmeds avatar Sep 24 '25 16:09 emmanuel-alanmeds

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Sep 24 '25 16:09 google-oss-bot

I want to provide as much context as I can. This is the payload (with some REDACTED) information when attemping to deploying the function

{ "endpoint": { "id": "", "project": "", "region": "us-central1", "entryPoint": "", "platform": "gcfv2", "runtime": "nodejs20", "callableTrigger": {}, "labels": { "deployment-tool": "cli-firebase" }, "serviceAccount": null, "ingressSettings": null, "availableMemoryMb": 1024, "timeoutSeconds": null, "maxInstances": null, "minInstances": 2, "concurrency": 80, "vpc": null, "environmentVariables": {}, "codebase": "default", "cpu": 1, "targetedByOnly": true, "hash": "7c64ddb58cd6300c9141930d0b5878c854dec187" }, "op": "create", "original": { "name": "FirebaseError", "children": [], "context": { "function": "projects//locations/us-central1/functions/" }, "exit": 1, "message": "Failed to create function projects//locations/us-central1/functions/", "original": { "name": "FirebaseError", "children": [], "context": { "body": { "error": { "code": 400, "message": "Could not create Cloud Run service . spec.template.metadata.annotations[run.googleapis.com/minScale]: ", "status": "INVALID_ARGUMENT" } }, "response": { "statusCode": 400 } }, "exit": 1, "message": "Request to https://cloudfunctions.googleapis.com/v2/projects//locations/us-central1/functions?functionId= had HTTP Error: 400, Could not create Cloud Run service . spec.template.metadata.annotations[run.googleapis.com/minScale]: ", "status": 400 }, "status": 400, "code": 400 } } [2025-09-24T17:21:47.836Z] Error: Failed to create function *** in region us-central1 at /Users//.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:306:27 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Fabricator.createV2Function (/Users//.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:290:30) at async Fabricator.createEndpoint (/Users//.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:137:13) at async handle (/Users/***/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/firebase-tools/lib/deploy/functions/release/fabricator.js:89:17)

Error: There was an error deploying functions

emmanuel-alanmeds avatar Sep 24 '25 17:09 emmanuel-alanmeds

I am using v2 firebase functions

emmanuel-alanmeds avatar Sep 24 '25 17:09 emmanuel-alanmeds

this issue seems to be unique to us-central1 which is an issue because it is the default location and in our case, the functions cannot be deployed elsewhere as it relies on storage that is locked to the default location.

DejiAwoniyi avatar Sep 28 '25 19:09 DejiAwoniyi

@DejiAwoniyi Thanks for that! Makes a lot of sense - do you have a timeline as to when Google will fix it?

emmanuel-alanmeds avatar Sep 29 '25 15:09 emmanuel-alanmeds

@DejiAwoniyi Thanks for that! Makes a lot of sense - do you have a timeline as to when Google will fix it?

So sorry I do not. I am actually going through the same issue myself. It was through troubleshooting i realised the error only popped up on that location. Do you have a workaround you are trying?

DejiAwoniyi avatar Sep 29 '25 15:09 DejiAwoniyi

Hi! Thanks for raising this. It's been received and we will provide updates when available.

cabljac avatar Sep 29 '25 16:09 cabljac

@cabljac Thanks for the update. Do you happen to have a timeline for the fix?

My company, and countless other companies have not been able to deploy new function logic for about two weeks 😅 .

emmanuel-alanmeds avatar Sep 29 '25 16:09 emmanuel-alanmeds

running into this same issue!

kolaayanwale avatar Sep 29 '25 16:09 kolaayanwale

@cabljac Can you please escalate this to the highest priority as possible? for about 2 weeks, deployment at my startup has been at a halt and its causing serious bottlenecks.

emmanuel-alanmeds avatar Sep 29 '25 17:09 emmanuel-alanmeds

Yes. I’m about 16 days in of the same issue on my prod project 😅

DejiAwoniyi avatar Sep 29 '25 17:09 DejiAwoniyi

@cabljac any updates? I see that the ticket is triaged, but any timelines for a fix?

emmanuel-alanmeds avatar Sep 30 '25 15:09 emmanuel-alanmeds

Hello @emmanuel-alanmeds, thanks again for opening this issue. I am currently looking into reproducing the issue. Will keep you posted on any developments. Cheers!

HassanBahati avatar Sep 30 '25 15:09 HassanBahati

@HassanBahati thanks for looking into it. Deployments just stopped working on certain projects (I even tried creating a function on the google cloud console and got the same minScale error). It's almost like a weird project corruption of some sort

DejiAwoniyi avatar Sep 30 '25 16:09 DejiAwoniyi

Hi all, if you hit this issue, please check whether the quota run.googleapis.com/cpu_allocation is set to unlimited in us-central1 region on your project. If so, please edit the quota to ask for a change to update it to the default value 20,000,000. This would be a workaround to unblock the function deployment.

yanweiguo avatar Sep 30 '25 18:09 yanweiguo

@yanweiguo Unfortunately that value is already set to 20,000,000 for me.

emmanuel-alanmeds avatar Sep 30 '25 18:09 emmanuel-alanmeds

@yanweiguo Unfortunately that value is already set to 20,000,000 for me.

@emmanuel-alanmeds please check if there are any Cloud Run quota (starts with run.googleapis.com) with unlimited value in us-central1, while other regions have limited value.

yanweiguo avatar Sep 30 '25 18:09 yanweiguo

@yanweiguo Ah I found the Cloud Run quota with a value of unlimited and changed it and it WORKED! Thank you so much

@DejiAwoniyi @kolaayanwale Please see if this workaround helps for you

emmanuel-alanmeds avatar Sep 30 '25 19:09 emmanuel-alanmeds

@emmanuel-alanmeds great to know that you are resolved on this.

@DejiAwoniyi and @kolaayanwale please checkout the work around recommended by @yanweiguo.

Kindly confirm if you are unblocked as well on this. Thanks!

HassanBahati avatar Sep 30 '25 22:09 HassanBahati

@emmanuel-alanmeds great to know that you are resolved on this.

@DejiAwoniyi and @kolaayanwale please checkout the work around recommended by @yanweiguo.

Kindly confirm if you are unblocked as well on this. Thanks!

Yes, We have been unblocked on this side. God bless you

DejiAwoniyi avatar Oct 01 '25 11:10 DejiAwoniyi

@DejiAwoniyi @kolaayanwale @yanweiguo @HassanBahati

Hello all again!

I am dealing with issues deploying yet again. But it is a different error. Are any of you experiencing similar issues?

Build failed with status: FAILURE and message: installing pnpm dependencies: (error ID: 8622936f):


ERR_PNPM_LOCKFILE_CONFIG_MISMATCH  Cannot proceed with the frozen installation. The current "catalogs" configuration doesn't match the value found in the lockfile

Update your lockfile using "pnpm install --no-frozen-lockfile". For more details see the logs at....

emmanuel-alanmeds avatar Dec 02 '25 15:12 emmanuel-alanmeds