w9jds / firebase-action

GitHub Action for interacting with Firebase
MIT License
922 stars 198 forks source link

Issue with Multiple Triggering of Cloud Functions Deployed in v12.8.0 Due to FIRESTORE_PREFER_REST Env Variable #202

Open davidkychen opened 10 months ago

davidkychen commented 10 months ago

This may be a Firebase issue. In the recent update to version 12.8.0, the environment variable FIRESTORE_PREFER_REST is being automatically set to true. We've observed a critical issue where this change is causing some longer-running cloud functions, which are hosted through Firebase hosting, to trigger multiple times (observed at least 10 times more than expected).

This behavior of multiple triggers does not occur when the function is invoked directly through its original Cloud Function trigger URL. However, the issue arises when the function is called via the Firebase hosting route.

A temporary workaround we found is to unset the FIRESTORE_PREFER_REST variable or using an older version to deploy, which resolves the issue of multiple triggers.