In app purchase - ServerLog function not deploying

I am working through the in app purchase documents. All my funcitons deployed except the serverLog function. serverLog docs.

Not sure what I am missing. I know @jared is a pro at this so hopefully he can straighten me out.


const functions = require("firebase-functions");
const admin = require("firebase-admin");

exports.purchaseInfo = functions.https.onRequest((request, response) => {
  const dbRef = admin.database().ref("purchases")
  const data = request.body;
  const queryTerms = request.query;
  const objToSave = {
    data, queryTerms, timestamp: admin.firestore.FieldValue.serverTimestamp(),

  //add this objToSave the realtime database



  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "version": "1.0.0",
  "dependencies": {
    "firebase-admin": "^9.8.0",
    "firebase-functions": "^3.14.1"

I get this notification when it fails:

I may have figured it out. I have not tested to see if it works but it did deploy and I got the green check in the Google Cloud Functions.

Possible error on this page? serverLog docs.

The line in the code currently:

exports.purchaseInfo = functions.https.onRequest((request, response) => {

This line should be???

exports.serverLog = functions.https.onRequest((request, response) => {

I’m on a NO-CODE website because I don’t know anything about actual code. So I could be wrong. However I got my green check mark. Now I will continue through the docs and update as I go unless someone corrects me otherwise.

1 Like

You should be able to name it whatever you want. Glad it’s working though!

One thing to be sure of is that the entryPoint matches the export name. I’d guess that to be the issue here for you.