Is it just me or are the firebase extensions currently not working properly? If I edit it via the cloud console and try to save I get an error back (as I can see in my developer console):
PATCH https://firebaseextensions.clients6.google.com/v1beta/projects/evendsa-plattform/instances/firestore... 400 (Bad Request)
Firebase Extensions are not directly editable, and the error you're encountering is expected behavior. Firebase Extensions are designed to be pre-packaged solutions that encapsulate code, configuration, and dependencies, making them easy to install and use. This design, however, comes with certain limitations, primarily the inability to directly edit the extensions.
There are several reasons for this restriction. First, version control is crucial as each extension is versioned to ensure compatibility with updates and avoid potential issues. Second, dependency management is a key factor; extensions often rely on other services or libraries, and modifying them directly could disrupt these dependencies. Lastly, security is a major concern. Firebase ensures the integrity and security of extensions, and allowing edits could introduce vulnerabilities.
Despite these limitations, there are several workarounds for customization. Most Firebase Extensions provide configuration parameters that allow you to adjust specific settings without modifying the underlying code. Always check the extension's documentation for available parameters. For deeper customization needs, you can fork the extension's source code (if available) and modify it, creating your own version. However, this approach means you'll be responsible for maintenance and updates.
For more complex logic, consider using Firebase Cloud Functions. You can trigger functions based on events in your Firestore database and implement custom actions or data transformations. If you have extensive customization needs, building your own Firebase Extension is also an option, though it requires significant development effort but offers complete control.
For example, if you're using the Firestore Counter Extension and want to change the default increment value from 1 to 5, you can do so by adjusting the configuration parameters. Go to your Firebase project, navigate to the "Extensions" section, select the Firestore Counter Extension, look for a configuration parameter like "incrementValue" (the exact name might vary), change its value from 1 to 5, and save your changes. The extension will now increment the counters by 5 each time it's triggered.
Thanks a lot for your reply. The things is, I encountered the problem when I was trying to configure the parameters in the extensions tab in my firebase project. After changing the configurations I clicked on "save" and nothing happened. The only thing I saw was the error in the developer console. I'm talking about the Trigger Email from Firestore extension by the way.
I reinstalled the extension though and now it works.