Cannot deploy Firebase Function - node.js

I am building a flutter project,
when I deploy firebase functions I am getting errors. The errors are not the same they change.
This is the command I've run:
firebase deploy --only functions:getOrder
Example:
Error: Cloud Runtime Config is currently experiencing issues, which is preventing your functions from being deployed. Please wait a few minutes and then try to deploy your functions again.
Run firebase deploy --except functions if you want to continue deploying the rest of your project.
Another possible error is:
Error: Failed to make request to https://serviceusage.googleapis.com/v1/projects/project-name/services/cloudfunctions.googleapis.com
I tried:
firebase login --reauth
firebase login and firebase logout
firebase use --add
Nothing works.
How to solve?
Is there another way to deploy firebase functions?

Related

How to deploy firebase cloud function dependencies require js

I am using node.js to deploy firebase cloud function, I got a problem I have some js files require my custom functions. When my custom function is updated, how can I deploy it?
For instance, I have two js files Purchase.js and MyTime.js
Puchase.js
const MyTime = require('../Scoz/MyTime.js');
MyTime.js
some methods
If I only modified MyTime.js how can I deploy it?
Normally, I use firebase deploy --only functions: Purchase to deploy function, but if I only want to update "MyTime.js". How can I do?
Many thanks
You cannot just update those custom function (which are not cloud functions). You would have to deploy the function(s) which uses that custom functions.
firebase deploy --only functions:cloudFunctionOne
This will deploy only cloudFunctionOne and if I recall correctly, the custom function will be updated for this cloud function only.

Ubuntu - Running gcloud app deploy command is throwing error

I was following along this tutorial on YouTube. I created an empty project on gcp, then ran gcloud init and switched to that project, then I ran gcloud app deploy and I ran into problems. In this tutorial video, it was not mentioned that I should enable Cloud Build API to deploy. So I don't know if only not enabling the Cloud Build API was the problem or something else was the problem.
Here's my app.yaml
runtime: nodejs12
I've tried many other stack overflow posts' answers like this one, but nothing worked for me. When I run gcloud app deploy when I am inside my new project, I am getting this error:
ERROR: (gcloud.app.deploy) Error Response: [7] Access Not Configured. Cloud Build has not been used in project XXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbuild.googleapis.com/overview?project=[projectId] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
I am using Ubuntu 20.04 LTS - x86-64.
You must complete two steps:
Enable Google Cloud Billing.
Enable Cloud Build API.
You cannot skip enabling Cloud Billing. Once you set up the Billing Account, you might have to wait a few minutes before you can enable APIs.
The first 120 minutes of Cloud Build time is free. Then you will be charged $.003 per minute.
The page is a collection of documents on Google Cloud Billing.
Google Cloud Billing Documentation
You can enable the Cloud Build API in the console or via the CLI.
Enable Cloud Build API in the console
gcloud services enable cloudbuild.googleapis.com
gcloud services enable

DNS_PROBE_FINISHED_NXDOMAIN trying to access AWS lambda endpoint

I'm trying to deploy a Node/Express app to AWS lambda using serverless. It seems to work, but after several executions of serverless deploy, I get DNS_PROBE_FINISHED_NXDOMAIN error when trying to access the endpoint.
If I change to another AWS region, it works, but it happens again after a few executions of
serverless deploy
The output of serverless deploy command is always right, no error shown.
I guess this question lacks of information, but I don't know what I need to provide.

Can 't deploy webhook

Everytime if I want to export my webhook into my firebase project this happens:
functions: Finished running predeploy script.
i functions: ensuring necessary APIs are enabled...
functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
Deploy complete!
Project Console: https://console.firebase.google.com/project/Nameoftheproject-d9d5/overview
It says that the deploy is complete, but it doesn't create a function or export my webhook in my firebase project. I want to export all to a webhook so I can use it in my dialogflow project. Can someone help me out? I don't know what I did wrong.
Make sure you do the following
You need to enable Webhook in your Dialogflow fulfillment and paste the deployment URL of Firebase functions that are deployed using firebase deploy.
Like this:
Make sure you are using the correct Actions Project before firing firebase deploy
firebase use <PROJECT_ID>
Your Action's project ID can be found in the Actions Console, under Overview > (Gear icon) > Project settings.
Refer the following Google Codelabs link to setup connection between your local environment and firebase functions:
https://codelabs.developers.google.com/codelabs/actions-2/#2

Getting Logic Apps to recognize Functions from precompiled assemblies?

I have an Azure Function App in C# that I precompile and deploy to Azure using VSTS. I am successfully deploying and can test my 2 HTTP triggers from postman and the command line.
I am now trying to use these Functions in a Logic App. When I go to create a Function action, I select my Function App but it does not recognize my 2 Functions.
Selecting the onsite-functions app should show my 2 Functions.
But instead, it prompts me to create a Function.
I have created an OpenAPI spec for this Function App, but this does not help. Does anyone have any ideas on how to get my Functions showing up in the Logic App designer?
Update
Switching from a Kudu deployment to an Azure App Service Deploy step seems to fix the issue.

Resources