Firebase Functions: "Failed to get status of functions deployments" - firebase

I am getting a very strange error when I attempt to deploy my firebase functions.
As a test to rule out my code, I deleted everything except the require(firebase-functions); statement in my index.js file and then tried to deploy, but I again received the same error message:
Error: Failed to get status of functions deployments.
It also prompts me to see my function log file, but there is nothing new or relevant outputted there. Anyone have any idea how to fix this?

Please be sure you have the right nodejs version. Also for any issue regarding firebase product, the status can be checked in this link:
https://status.firebase.google.com/
The above link will provide a status for each service.
When the issue gets solved, you can just deploy your functions again with a different name instead of deleting or just redeploy them.
Edit:
Currently in the link above the issue is listed there, there is currently Service Disruption.
Please check this:https://status.firebase.google.com/incident/Functions/18003
to know when this issue will be solved as the firebase team has seen that there is a problem.

firebaser here
There is an ongoing issue with deploying Cloud Functions through the Firebase CLI. To track its status, look a the Firebase status page.
Update: the issue was fixed at 7:22 am PST.
I just successfully deployed some of my own functions, which was failing earlier. Thanks for your reports and patience everyone!

I was getting this error when there were no deployment issues mentioned on the status page.
It turned out that the project just needed to "Link a billing account".
This can be done via the Billing section on Google Cloud Platform.

Related

Google Cloud WordPress click to deploy fails to deploy - Waiter time out

I am having trouble setting up a WordPress from the GCP marketplace. Following the 15 min tutorial, when I click deploy, it times out with the error message:
After some research I found this discussion where it is suggested to enable the VPC private access to solve the issue. It did not work. So I tried creating a new VPC with only one subnet configured as suggested. Same error.
I've tried other options in the marketplace, and any of them using the Waiter time out. That tells me it's probably something I am missing in my configuration, but I can't see what could be.
Can anyone see anything I am missing here? Thanks in advance.

Cloud Functions Deployment Error build step 3

Just recently I am starting to experience an issue when trying to deploy my functions through Firebase. When running the command firebase deploy --only functions one of my four functions deploy correctly, but the other three throw this error in the firebase-tools console:
Deployment error.
Build failed: Build error details not available. Please check the logs at url to my GCP logs
When I look at the logs the error message that shows for each function that is failing is:
ERROR: build step 3 "us.gcr.io/fn-img/buildpacks/nodejs10/builder:nodejs10_20200922_20_RC00" failed: step exited with non-zero status: 46
I have searched and googled for quite a while now and I cannot find anyone reporting the same error code, having the same non-zero status returned, or having functions fail on step 3. There doesn't seem to be much for documentation on troubleshooting the errors either.
Hopefully someone here can point me in the right direction.
Thanks!
The error seems to be caused by a missing (or not accessible) file in the history/restore functionality of Firebase. Don't know the reason for this.
A workaround that worked for me was:
Remove the functions in the web console
Deploy normally > firebase deploy
Answering since I can't comment in response to xaphod, Markus's fix worked for me, thank you mate! Deleting the function means it creates a new one rather than trying to restore it, which is the failed step 3 in the build process.
In response to xaphod, I did setup a lifecycle rule for old files in the artifacts bucket, it was by far my biggest bucket in storage and was pushing the free tier limit. I set it up a bit short probably, delete 5 days after last updated time, but surprisingly didn't run into this issue until today (possibly because I usually just deploy them all whenever I update one). I removed the lifecycle rule for now, although I'd rather it not run up the storage space again, I might end up contacting support to see if there's a way to lifecycle them without deleting the most recent, not sure why it doesn't just clear out the old images on updates though.
Found the post that suggested setting up lifecycle rules, firebase storage artifacts is huge, and did some testing as well, deleted all the files in us.artifacts and deployed all my functions (got errors on all them, only deleted the function that I needed to update earlier and deployed it by itself). Doesn't cause any errors, just takes a bit longer, so I think the issue can be fixed by deleting them all or deleting nothing, probably going to set the lifecycle rule to delete immediately and deal with the increased deploy time, rather than the cost of firebase storage.

E/FirebaseInstanceId( 5789): Topic sync or token retrieval failed on hard failure exceptions: AUTHENTICATION_FAILED. Won't retry the operation

While trying to connect Android Studio with a flutter project to Firebase, this error code appeared. After doing A LOT of research, I tried to change my thing, but none seemed to work. I changed my emulator from API 28 to 26 to R, with Nexus 5X which supports Google Play Services. Afterwards, I also added firebase_auth code and cloud_firestore code to pubspec.yaml but it didn't work either. I also tried to change the emulator to Cold Boot but that didn't help. I am really stuck, please HELP!!! Thx :)
Per GitHub post, this error is actually not related to Flutter. In fact, there is an open GitHub issue in Firebase regarding this error. You can check the recommended workarounds here.

Getting Firebase emulator error because non-existent SDK is not enabled

I'm trying to get some Firebase functions emulated locally, and have followed Google's local emulator instructions. When I run firebase serve I get this error:
Error from emulator. FirebaseError: HTTP Error: 403,
Mobile SDK API has not been used in project <my project ID>
before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/mobilesdk-pa.googleapis.com/overview?project=<my project ID> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Seems straightforward, except that when I follow the supplied URL I get an error because the "Mobile SDK API" does not exist. I've tried searching on Google's API page as well and there is definitely not an API with that name.
Anybody know how I can get around this issue?
(I also tried firebase functions:shell and get the same error)
I got this issue fixed by logging into firebase, since the error was showing on a different machine.
After running firebase login and the authentication process, firebase serve worked without issues.
I was having the same problem and fixed it for myself. I was running Node v11.14.0 and downgraded to the latest version of Node 8 (v 8.16.0).
In my case, the problem was that I was running an outdated version of firebase-tools on the CLI. Running npm update firebase-tools resolved the issue.

Why am I no longer able to deploy functions (Error 503)?

No longer able to deploy cloud function via "firebase deploy" command - receiving error: "HTTP Error: 503, The service is currently unavailable"
I previously had a single function deployed and working until a slight modification was causing an authentication error, so I temporarily deleted it until I had time to fix the error.
So a couple days pass, I modify the original code (just added a bit of code relating to service account credentials, didn't even modify the actual function) and tried to re-deploy it (using 'firebase deploy') however it's throwing the following error: "HTTP Error: 503, The service is currently unavailable".
I thought maybe the service is currently down, but Firebase Status Dashboard shows all services are green and noone else seems to be complaining about this error at the moment. I've tried reinstalling/updating firebase-tools and even reverting the functions index.js code back to what it had been when I last successfully deployed, but same error every time. I don't think it has anything to do with the code on my end, but perhaps some weird bug relating to my account/api/authentication.
I've submitted a tech support question on firebase and am awaiting response, but thought I'd try my luck here as well.
Any suggestions?
After some back and forth with firebase technical support, turns out it is some strange bug on their server end (in relation to this particular project) as I'm able to deploy the same functions no problem to other projects. It may have been "triggered" initially by hitting a function invocation quota when I was having issues with one of the functions in the past (an issue which somehow caused the function to be repeatedly called until I realized and deleted it 2 days after). However the project should no longer be limited and I still am unable to deploy any functions on that particular project.
The issue has been handed onto their engineers and hopefully will have it resolved on their end soon.

Resources