Questions tagged [google-cloud-functions]

Google Cloud Functions is a lightweight, event-based, asynchronous compute solution that allows you to create small, single-purpose functions written in Node.js, Python or Go that respond to cloud events without the need to manage a server or a runtime environment.

Google Cloud Functions is a lightweight, event-based, asynchronous compute solution that allows you to create small, single-purpose functions written in or that respond to cloud events without the need to manage a server or a runtime environment.

Related tags:

17585 questions
60
votes
1 answer

Firebase cloud functions using Python?

We are using GCP's Firebase with Firestore for a new mobile app we are developing. As part of this effort we need to deploy a number of cloud functions which will act as Firestore triggers for doing some back end processing. Our intention is to…
60
votes
32 answers

Error: Functions did not deploy properly

Functions deploy had errors. To continue deploying other features (such as database), run: firebase deploy --except functions Error: Functions did not deploy properly.
Mario
  • 847
  • 1
  • 8
  • 13
60
votes
10 answers

Cloud Functions for Firebase killed due to memory limit exceeded

I keep getting a sporadic error from Cloud Functions for Firebase when converting a relatively small image (2mb). When successful, the function only takes about 2000ms or less to finish, and according to Image Magick documentation should I should…
Kirill
  • 3,667
  • 4
  • 30
  • 35
59
votes
4 answers

Firestore Add value to array field

Im trying to use Firebase cloud functions to add the id of a chatroom to the users document in an array field. I cant seem to figure out the way to write to an array field type. here is my cloud function exports.updateMessages =…
59
votes
8 answers

Are Google Cloud Functions protected from DDoS attacks?

As far as I understand, my Google Cloud Functions are globally accessible. If I want to control access to them, I need to implement authorization as a part of the function itself. Say, I could use Bearer token based approach. This would protect the…
Igor Soloydenko
  • 11,067
  • 11
  • 47
  • 90
59
votes
4 answers

Google Firebase Error(Function returned undefined, expected Promise or value)

I'm developing Server with Firebase. I had copied Google Developer's Video on Youtube. It works well, but on log there is an error: Function returned undefined, expected Promise or value It says function returned undefined, but I make function…
59
votes
5 answers

Use firebase cloud function to send POST request to non-google server

I was wondering if its possible to use a firebase cloud function to send a post request to a non-google server (from what I can find I need to be on the blaze plan in order to interact with non google servers) Basically I want to POST to an external…
Stone Preston
  • 1,828
  • 4
  • 20
  • 35
58
votes
9 answers

Firebase Auth/unauthorized domain. Domain is not authorized

I am trying to run this sample firebase project, but I keep getting this error in the browser console. Lf {code: "auth/unauthorized-domain", message: "This domain (mail-demo-fcm.firebaseapp.com) is not…se console -> Auth section -> Sign in method…
moonwalker7
  • 1,122
  • 3
  • 11
  • 29
58
votes
6 answers

Possible to get static IP address for Google Cloud Functions?

I would like to develop a Google Cloud Function that will subscribe to file changes in a Google Cloud Storage bucket and upload the file to a third party FTP site. This FTP site requires allow-listed IP addresses of clients. As such, it is possible…
EthanS
  • 734
  • 1
  • 5
  • 8
55
votes
10 answers

Google Cloud Functions enable CORS?

I just finished the Hello World Google Cloud Functions tutorial and received the following response headers: Connection → keep-alive Content-Length → 14 Content-Type → text/plain; charset=utf-8 Date → Mon, 29 Feb 2016 07:02:37 GMT Execution-Id →…
Federico Elles
  • 4,659
  • 7
  • 27
  • 35
51
votes
10 answers

Firebase cloud function deploy error

irregularly my firebase deployment get stuck at this log: i functions: updating function [FUNCTION NAME]... After canceling the deploy and retrying it throws the following error message: ⚠ functions: failed to update function resetBadgeCount ⚠ …
Florian
  • 533
  • 1
  • 4
  • 5
51
votes
5 answers

How do you un-deploy Cloud Functions for Firebase?

I was experimenting with Cloud Functions for Firebase and deployed one of the samples in the functions-samples repo and linked it to an existing project using firebase use --add. Since I was just playing around, these files were not added to my…
HowlingFantods
  • 802
  • 1
  • 7
  • 14
50
votes
4 answers

Running Cloud Functions locally gives error "functions.config() is not available"

Cloud Functions for Firebase was just recently released and I am following the instructions on a fresh install. Here is the "Get Started" page. I have installed "npm install -g firebase-tools" and all my files are in my project. I am using WebStorm…
temp_
  • 1,238
  • 2
  • 12
  • 24
49
votes
3 answers

FieldValue undefined when using functions and Firestore

I have the following function: const functions = require('firebase-functions'); const admin = require('firebase-admin'); const FieldValue = require('firebase-admin').FieldValue; module.exports = functions.firestore …
49
votes
7 answers

Secure Google Cloud Functions http trigger with auth

I am trying out Google Cloud Functions today following this guide: https://cloud.google.com/functions/docs/quickstart I created a function with an HTTP trigger, and was able to perform a POST request to trigger a function to write to Datastore. I…