george43g / better-firebase-functions

This repo provides functionality for a better way of organising files, imports and function triggers in Firebase Cloud Functions
Mozilla Public License 2.0
179 stars 15 forks source link

Cloud Firestore triggers shows HTTP Error 400 #8

Closed alexpchin closed 2 years ago

alexpchin commented 4 years ago

I have a project with 59 functions, all of the functions deploy successfully except the Cloud Firestore triggers.

⚠  functions: failed to update function bookingsOnUpdate
HTTP Error: 400, The request has errors

Running firebase deploy --debug --only functions:bookingsOnCreate shows:

<<< HTTP RESPONSE BODY {"error":{"code":400,"message":"The request has errors","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"event_trigger","description":"Expected value not-a-project to equal #############"}]}]}}

Where ############# is the project name.

There is also:

[2020-05-30T10:05:11.879Z] Trigger is:  {"eventTrigger":{"resource":"projects/not-a-project/databases/(default)/documents/bookings/{id}","eventType":"providers/cloud.firestore/eventTypes/document.create","service":"firestore.googleapis.com"}}
george43g commented 4 years ago

Can you paste all or part of the export of the function that's failing? This seems more likely to be an issue with the trigger rather than BFF... especially if the other functions are deploying successfully.