Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Can't delete or overwrite function that failed to deploy earlier #118
I had an error in a function and when I tried to deploy it, it failed with an error message. I then fixed the error and tried to redeploy, but it would still show me the same error message. So I thought I could delete the function, but it still produces the same error. I even tried to re-deploy with an empty index.js file, to reset it, but it wouldn't work. The working functions get deleted successfully, but the function that had the error in it, won't go. I'll paste the command line output, that should make it clearer what the error is:
Then if I leave index.js empty and re-run deploy, I get:
No matter how many times I re-run the command, it produces the same output. For some reason it won't delete the foo function.
Thanks for your reply. Here is the contents of
Here is a sample log entry for the failed execution:
I did run
Also, I tried to deleting the function using the Google Cloud web interface (https://console.cloud.google.com/functions/list?project=xxx). When I hit the delete function button, it shows a notification saying: Deleting function successfully started. But the function never seems to get deleted.
It looks like this is a permissions issue with your storage bucket. I would try deleting your functions file locally (save your code), and re-create a local repo. But first, try
Thanks, I tried your instructions, but I still get the error that the function won't delete. It is not a big problem though as everything else seems to work fine, besides the warning message.
I have another related question however. I have a function that gets triggered when a file gets uploaded to a storage bucket. Then in that function, I download the file, process it and upload it to the bucket under a different name (similar to the generate-thumbnail example in this repository). Then for the newly uploaded file I can generate a download URL using:
This URL is pretty long, so I want to shorten it with Dynamic Links. To do this I make a POST request to the webapi, e.g:
The problem is that the short link redirects to the URL
How can I make a short link that preservers the %2F? Also, is it correct to use the web api for Dynamic Links or is there something in
I recently had an issue similar to this. I was trying to deploy functions, but the previous deployment was still in process (for like 15 minutes). I tried to delete the functions from the Google Cloud Functions console manually, and the delete process itself then took another 10 minutes. Eventually, they did delete and I was able to re-deploy. I think there was something funky going on, on Google's end.
After the delete completed successfully, I was able to deploy again without issue.