FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

[URGENT] Firestore Rules are beign replaced while sending Push Notifications #4940

Open Xefrok opened 4 days ago

Xefrok commented 4 days ago

Can we access your project?

Current Behavior

Hello FlutterFlow Support Team,

I’ve encountered a critical issue with the Push Notifications feature in the FlutterFlow Settings. Each time I send a push notification using this option, it completely overwrites my existing Firestore rules with a different set of rules.

Here are my Firestore rules before clicking on "Send Push Notification": image

And here are my Firestore rules after clicking "Send Push Notification": image

This issue caused a significant outage in my production environment for over 6 hours until I identified that the overwritten rules were the root cause. This behavior is not only inconvenient but also poses a severe risk to live applications.

Could you please address this issue urgently? It’s crucial for the Push Notifications feature to work without altering Firestore rules, or at least notify users about any changes it will make.

Expected Behavior

My rules should not beign changed without my permission or by any other actions rather than the "Deploy Firestore Rules"

Steps to Reproduce

1.- Create a new blank project 2.- Connect it to firebase 3.- Create 2 or 3 collections and deploy rules 4.- Enable push notifications 5.- Send push notification

Reproducible from Blank

Bug Report Code (Required)

Not neccesary

Visual documentation

image

Environment

- FlutterFlow version: 5.0.10+
- Platform: Web
- Browser name and version: Chrome
- Operating system and version affected: Windows 11

Additional Information

FYI: I already re-deployed Push Notifications in case was that but in the Cloud Function code it doesn't seems to be the problem i think is triggered from the Send Push Notification button

Alezanello commented 4 days ago

Hello,

Thank you for bringing this issue to our attention, and I sincerely apologize for the inconvenience this has caused. I completely understand how impactful this must have been for you.

I’ll escalate this to our engineering team with high priority to ensure it’s addressed as soon as possible.

Thank you for your patience and understanding!

aemelyanovff commented 3 days ago

@Xefrok Does your Firebase project have more than one Firestore database in it?

Xefrok commented 3 days ago

@Xefrok Does your Firebase project have more than one Firestore database in it?

Yes, do you think that could generated the issue? but I didn't add the second database to the FlutterFlow project

image

aemelyanovff commented 3 days ago

@Xefrok Does your Firebase project have more than one Firestore database in it?

Yes, do you think that could generated the issue? but I didn't add the second database to the FlutterFlow project

image

Thanks for the confirmation.

This is what FlutterFlow does before it sends a push notification:

  1. Load existing security rules in your Firebase project.
  2. Generate a new rule needed to send the notification.
  3. Merge the new rule with existing rules.
  4. Deploy rules.

The problem happens on the first step - instead of loading rules for the default database, it loads rules for the non-default database. I believe that this is a bug in Firebase Tools (the utility FlutterFlow uses to interact with user projects). I filed a bug there. In the meantime, we'll try to find some woraround.