Closed ky28059 closed 1 year ago
Having the same issue – can't do anything with my functions
Sorry for the troubles @Ancinek @ky28059. I think I have a hunch on what's going on here and will see if I can a fix out.
In the meantime, I think a workaround is to visit https://console.cloud.google.com/functions/list and delete the problematic function manually.
Yes, can confirm that deleting those from the Google Cloud Console worked like charm and I didn't have any issue deploying the function after that!
Sorry for the troubles @Ancinek @ky28059. I think I have a hunch on what's going on here and will see if I can a fix out.
In the meantime, I think a workaround is to visit https://console.cloud.google.com/functions/list and delete the problematic function manually.
Undeleteable function isn't showing on google cloud console for me, shows in firebase functions as 'cannot delete' - v2 function seems to be a limbo state
[debug] [2022-10-17T00:48:00.466Z] TypeError: Cannot read properties of undefined (reading 'service') at /Users/tom/Library/pnpm/global/5/.pnpm/firebase-tools@11.14.4/node_modules/firebase-tools/lib/deploy/functions/backend.js:198:113
Any update with this? I think this is problem when failed to deploy cloud functions v2. There are no serviceConfig property for it.
Example :
{
"name": "projects/<PROJECT_ID>locations/us-central1/functions/<FUNCTION_ID>",
"buildConfig": {
"build": "projects/<PROJECT_ID>/locations/us-central1/builds/75e6c15a-ac12-40fc-a155-4631c7d69085",
"runtime": "nodejs16",
"entryPoint": "<FUNCTION_ID>",
"source": {
"storageSource": {
"bucket": "gcf-v2-sources-<PROJECT_ID>-us-central1",
"object": "<FUNCTION_ID>/function-source.zip"
}
},
"sourceProvenance": {
"resolvedStorageSource": {
"bucket": "gcf-v2-sources-<PROJECT_ID>-us-central1",
"object": "<FUNCTION_ID>/function-source.zip",
"generation": "1669184567266545"
}
}
},
"state": "FAILED",
"updateTime": "2022-11-23T06:24:04.959406278Z",
"labels": {
"deployment-tool": "cli-gcloud"
},
"stateMessages": [
{
"severity": "ERROR",
"type": "CloudRunServiceNotFound",
"message": "Cloud Run service projects/<PROJECT_ID>/locations/us-central1/services/<FUNCTION_ID> for the function was not found. The function will not work correctly. Please redeploy."
}
],
"environment": "GEN_2"
}
@taeold I can confirm that deleting the wrong deployed v2 function from gcp console solved the problem
I had same issue. I solved it by deploying a dummy Cloud Run Service with problematic function name.
[REQUIRED] Environment info
firebase-tools: 11.3.0
Platform: Windows
[REQUIRED] Test case
Possibly related to #4770.
I upgraded a function from v1 to v2 and tried to deploy it, but the deploy failed with
Error: Pass the --force option to deploy functions that increase the minimum bill
. However, the function was created on Firebase without a trigger, and all subsequent attempts to redeploy, even after downgrading the function to v1, fail withError: An unexpected error has occurred.
. Running with --debug gives:The function cannot be deleted using the Firebase console and all attempts to redeploy or do
firebase functions:delete api
are met with the above error, essentially soft locking deployment.[REQUIRED] Steps to reproduce
Run
with the above configuration of v1 and v2 functions.
[REQUIRED] Expected behavior
Reverting to a v1 function should resolve deployment issues.
[REQUIRED] Actual behavior
The deploy still fails.