Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Failed to update cloud functions with firebase CLI tools

Hello,

we have a firebase project where we deploy cloud functions to. For the deployment process we use the firebase CLI tools.

Deploying functions worked fine for months, but since this evening it's not working any more. The process ends with the messages

Functions deploy had errors with the following functions:
	app-functions:function_a(europe-west3)
	app-functions:function_b(europe-west3)
	app-functions:function_c(europe-west3)
i functions: cleaning up build files... Error: There was an error deploying functions: - Error Precondition failed - Error Precondition failed - Error Precondition failed
 
Running the CLI in debug mode shows some more details:
i functions: updating Node.js 16 function ingest-functions:function_a(europe-west3)...
[2022-11-03T20:05:40.648Z] Precondition failed. Cannot update a GCF function without sourceUrl
i functions: updating Node.js 16 function ingest-functions:function_b(europe-west3)...
[2022-11-03T20:05:40.649Z] Precondition failed. Cannot update a GCF function without sourceUrl
i functions: updating Node.js 16 function ingest-functions:function_c(europe-west3)...
[2022-11-03T20:05:40.649Z] Precondition failed. Cannot update a GCF function without sourceUrl
[2022-11-03T20:05:40.655Z] Total Function Deployment time: 3
[2022-11-03T20:05:40.655Z] 3 Functions Deployed
[2022-11-03T20:05:40.655Z] 3 Functions Errored
[2022-11-03T20:05:40.655Z] 0 Function Deployments Aborted
Searching the internet for this specific error
Precondition failed. Cannot update a GCF function without sourceUrl 
does not give any results.
 
When I delete just one of the above functions, let's say function_b, in the cloud console, I can execute the deployment process for all previously failed functions (also the ones I did not delete) successfully.
 
Running the process after a succeeded deployment again, results in the same error mentioned.
 
Has anybody seen this behaviour before?
 
Thanks
Martin
Solved Solved
0 2 1,731
1 ACCEPTED SOLUTION

Reviewing the error you are getting, your issue might be in Cloud Storage. My suggestion is to create a new issue in this GitHub repository.

View solution in original post

2 REPLIES 2

Reviewing the error you are getting, your issue might be in Cloud Storage. My suggestion is to create a new issue in this GitHub repository.

Actually the issue was gone the next day and we can deploy without having to delete functions before. Good to know where to find the source code. If we run into this issue again, I'll create an issue in the repo.

Thank you.