mnsupreme
mnsupreme

Reputation: 155

Firebase Cloud Functions deploy error

I'm trying to deploy my project from firebase CLI but there is an issue with my functions. This is strange because I had no issues with it four weeks ago. I haven't changed any of my firebase cloud function settings. When I try to run
firebase deploy or
firebase deploy --only functions .

I get this same error:
There was an issue deploying your functions. Verify that your project has a Google App Engine instance setup at https://console.cloud.google.com/appengine and try again. If this issue persists, please contact support.

Error: HTTP Error: 500, Internal error encountered.


My cloud functions worked fine before without having to set up a Google App Engine and I can't seem to find anything mentioning the need for a Google App Engine in the Docs.

Upvotes: 14

Views: 9448

Answers (9)

mwx
mwx

Reputation: 331

For me it was also an outdated version of firebase tools.

npm install -g firebase-tools

Resolved the issue for me too as other comments also confirmed.

Keep your Firebase toolchain up to date to see detailed error messages.

In my case, it was the following:

Error: Firebase Storage has not been set up on project '...'. Go to https://console.firebase.google.com/project/.../storage and click 'Get Started' to set up Firebase Storage.

I tried to deploy without an --only flag but did not have storage set up in my project.

Upvotes: 0

devDeejay
devDeejay

Reputation: 6019

For me honeslty it was error in one of the imports names basically my code was the problem everything else was working fine but somehow logs and chatgpt point us to such kinds of tickets.

A javascript compile time error giving this as an error message rather than helping me actually debug the code.

#DebuggingInJavaScript 🥲

Upvotes: 0

LBT College
LBT College

Reputation: 1

firebase deploy --only functions .

Upvotes: 0

user8409653
user8409653

Reputation:

If your functions use the Cloud Datastore, You need to create a Cloud Firestore Database.

Go to the Firebase dashboard -> Database then create new database.

Upvotes: 1

Valentin Seehausen
Valentin Seehausen

Reputation: 735

For me it was an issue with the cloud resource location.

So just add firestore to your project and choose a location (i.e. europe-west).

Explanation:

After firebase init I got an error:

Error: Cloud resource location is not set for this project but the operation you are attempting to perform in Cloud Firestore requires it. Please see this documentation for more details: https://firebase.google.com/docs/projects/locations

So go to https://console.firebase.google.com/project, choose your project, and click on database and add firestore (or real time database if you prefer). That will also allow your functions to be uploaded.

Upvotes: 5

macki
macki

Reputation: 912

Check the Google Cloud Status Dashboard if there are service interruptions for the day that your system encountered the issue.

https://status.cloud.google.com/

Upvotes: 2

Ankit Jain
Ankit Jain

Reputation: 119

I did the following which resolved the issue for me

npm i -g firebase-tools

Visited the URL https://console.cloud.google.com/appengine because that was in the response

Upvotes: 3

Praveen N H
Praveen N H

Reputation: 51

Try updating firebase-tools to latest version. That fixed this issue for me.

npm install -g firebase-tools

Upvotes: 5

Dan Cornilescu
Dan Cornilescu

Reputation: 39814

If your functions use the Cloud Datastore then yes, you need to create an App Engine project (you don't actually need to deploy a GAE app, tho). From Dependency on App Engine application:

If you are using a Google Cloud library to access Cloud Datastore, your Cloud project requires an active App Engine application. Open the App Engine dashboard and confirm your Cloud project has an active App Engine app. Create an App Engine app if needed. The app must not be disabled.

Upvotes: 3

Related Questions